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);
586 static int es2_cport_connected(struct gb_host_device *hd, u16 cport_id)
593 req.cport_id = cpu_to_le16(cport_id);
598 cport_id, ret);
605 static int es2_cport_flush(struct gb_host_device *hd, u16 cport_id)
612 req.cport_id = cpu_to_le16(cport_id);
616 dev_err(dev, "failed to flush cport %u: %d\n", cport_id, ret);
623 static int es2_cport_shutdown(struct gb_host_device *hd, u16 cport_id,
635 req.cport_id = cpu_to_le16(cport_id);
642 cport_id, ret, result);
649 static int es2_cport_quiesce(struct gb_host_device *hd, u16 cport_id,
664 req.cport_id = cpu_to_le16(cport_id);
671 cport_id, ret, result);
678 static int es2_cport_clear(struct gb_host_device *hd, u16 cport_id)
685 req.cport_id = cpu_to_le16(cport_id);
689 dev_err(dev, "failed to clear cport %u: %d\n", cport_id, ret);
696 static int latency_tag_enable(struct gb_host_device *hd, u16 cport_id)
705 USB_RECIP_INTERFACE, cport_id, 0, NULL,
710 cport_id);
714 static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id)
723 USB_RECIP_INTERFACE, cport_id, 0, NULL,
728 cport_id);
823 u16 cport_id;
844 cport_id = gb_message_cport_unpack(header);
846 if (cport_id_valid(hd, cport_id)) {
847 greybus_data_rcvd(hd, cport_id, urb->transfer_buffer,
850 dev_err(dev, "invalid cport id %u received\n", cport_id);