Lines Matching full:binding
38 struct mctp_pktbuf *mctp_pktbuf_alloc(struct mctp_binding *binding, size_t len) in mctp_pktbuf_alloc() argument
41 binding->pkt_size + binding->pkt_header + binding->pkt_trailer; in mctp_pktbuf_alloc()
50 struct mctp_pktbuf *pkt = mctp_pktbuf_init(binding, storage); in mctp_pktbuf_alloc()
65 struct mctp_pktbuf *mctp_pktbuf_init(struct mctp_binding *binding, in mctp_pktbuf_init() argument
69 binding->pkt_size + binding->pkt_header + binding->pkt_trailer; in mctp_pktbuf_init()
72 buf->start = binding->pkt_header; in mctp_pktbuf_init()
335 int mctp_register_bus(struct mctp *mctp, struct mctp_binding *binding, in mctp_register_bus() argument
345 assert(binding->tx_storage); in mctp_register_bus()
349 mctp->busses[0].binding = binding; in mctp_register_bus()
351 binding->bus = &mctp->busses[0]; in mctp_register_bus()
352 binding->mctp = mctp; in mctp_register_bus()
355 if (binding->start) { in mctp_register_bus()
356 rc = binding->start(binding); in mctp_register_bus()
358 mctp_prerr("Failed to start binding: %d", rc); in mctp_register_bus()
359 binding->bus = NULL; in mctp_register_bus()
367 int mctp_bus_set_eid(struct mctp_binding *binding, mctp_eid_t eid) in mctp_bus_set_eid() argument
373 binding->bus->eid = eid; in mctp_bus_set_eid()
377 void mctp_unregister_bus(struct mctp *mctp, struct mctp_binding *binding) in mctp_unregister_bus() argument
384 binding->mctp = NULL; in mctp_unregister_bus()
385 binding->bus = NULL; in mctp_unregister_bus()
400 mctp->busses[0].binding = b1; in mctp_bridge_busses()
403 mctp->busses[1].binding = b2; in mctp_bridge_busses()
454 if (bus->binding->control_rx != NULL) { in mctp_ctrl_handle_msg()
455 /* MCTP bus binding handler */ in mctp_ctrl_handle_msg()
456 bus->binding->control_rx(src, msg_tag, tag_owner, in mctp_ctrl_handle_msg()
457 bus->binding->control_rx_data, in mctp_ctrl_handle_msg()
547 void mctp_bus_rx(struct mctp_binding *binding, struct mctp_pktbuf *pkt) in mctp_bus_rx() argument
549 struct mctp_bus *bus = binding->bus; in mctp_bus_rx()
550 struct mctp *mctp = binding->mctp; in mctp_bus_rx()
707 struct mctp *mctp = bus->binding->mctp; in mctp_packet_tx()
718 return bus->binding->tx(bus->binding, pkt); in mctp_packet_tx()
721 /* Returns a pointer to the binding's tx_storage */
731 size_t max_payload_len = MCTP_BODY_SIZE(bus->binding->pkt_size); in mctp_next_tx_pkt()
736 mctp_pktbuf_init(bus->binding, bus->binding->tx_storage); in mctp_next_tx_pkt()
739 hdr->ver = bus->binding->version & 0xf; in mctp_next_tx_pkt()
774 __mctp_msg_free(bus->tx_msg, bus->binding->mctp); in mctp_tx_complete()
796 /* If the binding was busy */ in mctp_send_tx_queue()
812 void mctp_binding_set_tx_enabled(struct mctp_binding *binding, bool enable) in mctp_binding_set_tx_enabled() argument
814 struct mctp_bus *bus = binding->bus; in mctp_binding_set_tx_enabled()
821 if (binding->pkt_size < MCTP_PACKET_SIZE(MCTP_BTU)) { in mctp_binding_set_tx_enabled()
823 "Cannot start %s binding with invalid MTU: %zu", in mctp_binding_set_tx_enabled()
824 binding->name, in mctp_binding_set_tx_enabled()
825 MCTP_BODY_SIZE(binding->pkt_size)); in mctp_binding_set_tx_enabled()
830 mctp_prinfo("%s binding started", binding->name); in mctp_binding_set_tx_enabled()
837 mctp_prdebug("%s binding Tx disabled", binding->name); in mctp_binding_set_tx_enabled()
844 mctp_prdebug("%s binding Tx enabled", binding->name); in mctp_binding_set_tx_enabled()
867 max_payload_len = MCTP_BODY_SIZE(bus->binding->pkt_size); in mctp_message_tx_on_bus()
902 __mctp_msg_free(msg, bus->binding->mctp); in mctp_message_tx_on_bus()
957 struct mctp *mctp = bus->binding->mctp; in mctp_dealloc_tag()