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