Lines Matching refs:cport_id
48 int gb_hd_cport_reserve(struct gb_host_device *hd, u16 cport_id)
53 ret = ida_alloc_range(id_map, cport_id, cport_id, GFP_KERNEL);
55 dev_err(&hd->dev, "failed to reserve cport %u\n", cport_id);
63 void gb_hd_cport_release_reserved(struct gb_host_device *hd, u16 cport_id)
67 ida_free(id_map, cport_id);
72 int gb_hd_cport_allocate(struct gb_host_device *hd, int cport_id,
79 return hd->driver->cport_allocate(hd, cport_id, flags);
81 if (cport_id < 0) {
84 } else if (cport_id < hd->num_cports) {
85 ida_start = cport_id;
86 ida_end = cport_id;
88 dev_err(&hd->dev, "cport %d not available\n", cport_id);
96 void gb_hd_cport_release(struct gb_host_device *hd, u16 cport_id)
99 hd->driver->cport_release(hd, cport_id);
103 ida_free(&hd->cport_id_map, cport_id);