Lines Matching refs:cport_id

365 gb_message_cport_pack(struct gb_operation_msg_hdr *header, u16 cport_id)
367 header->pad[0] = cport_id;
379 u16 cport_id = header->pad[0];
383 return cport_id;
390 static int message_send(struct gb_host_device *hd, u16 cport_id,
405 if (!cport_id_valid(hd, cport_id)) {
406 dev_err(&udev->dev, "invalid cport %u\n", cport_id);
420 gb_message_cport_pack(message->header, cport_id);
488 static int es2_cport_allocate(struct gb_host_device *hd, int cport_id,
495 switch (cport_id) {
498 dev_err(&hd->dev, "cport %d not available\n", cport_id);
514 if (cport_id < 0) {
517 } else if (cport_id < hd->num_cports) {
518 ida_start = cport_id;
519 ida_end = cport_id + 1;
521 dev_err(&hd->dev, "cport %d not available\n", cport_id);
528 static void es2_cport_release(struct gb_host_device *hd, u16 cport_id)
532 switch (cport_id) {
538 ida_simple_remove(&hd->cport_id_map, cport_id);
541 static int cport_enable(struct gb_host_device *hd, u16 cport_id,
563 cport_id, connection_flags);
568 USB_RECIP_INTERFACE, cport_id, 0,
572 cport_id);
583 static int es2_cport_connected(struct gb_host_device *hd, u16 cport_id)
590 req.cport_id = cpu_to_le16(cport_id);
595 cport_id, ret);
602 static int es2_cport_flush(struct gb_host_device *hd, u16 cport_id)
609 req.cport_id = cpu_to_le16(cport_id);
613 dev_err(dev, "failed to flush cport %u: %d\n", cport_id, ret);
620 static int es2_cport_shutdown(struct gb_host_device *hd, u16 cport_id,
632 req.cport_id = cpu_to_le16(cport_id);
639 cport_id, ret, result);
646 static int es2_cport_quiesce(struct gb_host_device *hd, u16 cport_id,
661 req.cport_id = cpu_to_le16(cport_id);
668 cport_id, ret, result);
675 static int es2_cport_clear(struct gb_host_device *hd, u16 cport_id)
682 req.cport_id = cpu_to_le16(cport_id);
686 dev_err(dev, "failed to clear cport %u: %d\n", cport_id, ret);
693 static int latency_tag_enable(struct gb_host_device *hd, u16 cport_id)
702 USB_RECIP_INTERFACE, cport_id, 0, NULL,
707 cport_id);
711 static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id)
720 USB_RECIP_INTERFACE, cport_id, 0, NULL,
725 cport_id);
820 u16 cport_id;
841 cport_id = gb_message_cport_unpack(header);
843 if (cport_id_valid(hd, cport_id)) {
844 greybus_data_rcvd(hd, cport_id, urb->transfer_buffer,
847 dev_err(dev, "invalid cport id %u received\n", cport_id);