Lines Matching +full:port +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0-or-later
10 * - Added Port-Write/Error Management initialization and handling
14 * - Added Input- Output- enable functionality, to allow full communication
21 #include <linux/dma-mapping.h>
39 u16 start; /* logical minimal id */
49 * rio_destid_alloc - Allocate next available destID for given network
52 * Returns next available device destination ID for the specified RIO network.
53 * Marks allocated ID as one in use.
59 struct rio_id_table *idtab = (struct rio_id_table *)net->enum_data; in rio_destid_alloc()
61 spin_lock(&idtab->lock); in rio_destid_alloc()
62 destid = find_first_zero_bit(idtab->table, idtab->max); in rio_destid_alloc()
64 if (destid < idtab->max) { in rio_destid_alloc()
65 set_bit(destid, idtab->table); in rio_destid_alloc()
66 destid += idtab->start; in rio_destid_alloc()
70 spin_unlock(&idtab->lock); in rio_destid_alloc()
75 * rio_destid_reserve - Reserve the specified destID
85 struct rio_id_table *idtab = (struct rio_id_table *)net->enum_data; in rio_destid_reserve()
87 destid -= idtab->start; in rio_destid_reserve()
88 spin_lock(&idtab->lock); in rio_destid_reserve()
89 oldbit = test_and_set_bit(destid, idtab->table); in rio_destid_reserve()
90 spin_unlock(&idtab->lock); in rio_destid_reserve()
95 * rio_destid_free - free a previously allocated destID
103 struct rio_id_table *idtab = (struct rio_id_table *)net->enum_data; in rio_destid_free()
105 destid -= idtab->start; in rio_destid_free()
106 spin_lock(&idtab->lock); in rio_destid_free()
107 clear_bit(destid, idtab->table); in rio_destid_free()
108 spin_unlock(&idtab->lock); in rio_destid_free()
112 * rio_destid_first - return first destID in use
118 struct rio_id_table *idtab = (struct rio_id_table *)net->enum_data; in rio_destid_first()
120 spin_lock(&idtab->lock); in rio_destid_first()
121 destid = find_first_bit(idtab->table, idtab->max); in rio_destid_first()
122 if (destid >= idtab->max) in rio_destid_first()
125 destid += idtab->start; in rio_destid_first()
126 spin_unlock(&idtab->lock); in rio_destid_first()
131 * rio_destid_next - return next destID in use
133 * @from: destination ID from which search shall continue
138 struct rio_id_table *idtab = (struct rio_id_table *)net->enum_data; in rio_destid_next()
140 spin_lock(&idtab->lock); in rio_destid_next()
141 destid = find_next_bit(idtab->table, idtab->max, from); in rio_destid_next()
142 if (destid >= idtab->max) in rio_destid_next()
145 destid += idtab->start; in rio_destid_next()
146 spin_unlock(&idtab->lock); in rio_destid_next()
151 * rio_get_device_id - Get the base/extended device id for a device
152 * @port: RIO master port
153 * @destid: Destination ID of device
156 * Reads the base/extended device id from a device. Returns the
157 * 8/16-bit device ID.
159 static u16 rio_get_device_id(struct rio_mport *port, u16 destid, u8 hopcount) in rio_get_device_id() argument
163 rio_mport_read_config_32(port, destid, hopcount, RIO_DID_CSR, &result); in rio_get_device_id()
165 return RIO_GET_DID(port->sys_size, result); in rio_get_device_id()
169 * rio_set_device_id - Set the base/extended device id for a device
170 * @port: RIO master port
171 * @destid: Destination ID of device
173 * @did: Device ID value to be written
175 * Writes the base/extended device id from a device.
177 static void rio_set_device_id(struct rio_mport *port, u16 destid, u8 hopcount, u16 did) in rio_set_device_id() argument
179 rio_mport_write_config_32(port, destid, hopcount, RIO_DID_CSR, in rio_set_device_id()
180 RIO_SET_DID(port->sys_size, did)); in rio_set_device_id()
184 * rio_clear_locks- Release all host locks and signal enumeration complete
189 * each device. Returns 0 on success or %-EINVAL on failure.
193 struct rio_mport *port = net->hport; in rio_clear_locks() local
198 /* Release host device id locks */ in rio_clear_locks()
199 rio_local_write_config_32(port, RIO_HOST_DID_LOCK_CSR, in rio_clear_locks()
200 port->host_deviceid); in rio_clear_locks()
201 rio_local_read_config_32(port, RIO_HOST_DID_LOCK_CSR, &result); in rio_clear_locks()
204 "RIO: badness when releasing host lock on master port, result %8.8x\n", in rio_clear_locks()
206 ret = -EINVAL; in rio_clear_locks()
208 list_for_each_entry(rdev, &net->devices, net_list) { in rio_clear_locks()
210 port->host_deviceid); in rio_clear_locks()
215 rdev->vid, rdev->did); in rio_clear_locks()
216 ret = -EINVAL; in rio_clear_locks()
221 rdev->phys_efptr + RIO_PORT_GEN_CTL_CSR, in rio_clear_locks()
225 rdev->phys_efptr + RIO_PORT_GEN_CTL_CSR, in rio_clear_locks()
233 * rio_enum_host- Set host lock and initialize host destination ID
234 * @port: Master port to issue transaction
236 * Sets the local host master port lock and destination ID register
237 * with the host device ID value. The host device ID value is provided
238 * by the platform. Returns %0 on success or %-1 on failure.
240 static int rio_enum_host(struct rio_mport *port) in rio_enum_host() argument
244 /* Set master port host device id lock */ in rio_enum_host()
245 rio_local_write_config_32(port, RIO_HOST_DID_LOCK_CSR, in rio_enum_host()
246 port->host_deviceid); in rio_enum_host()
248 rio_local_read_config_32(port, RIO_HOST_DID_LOCK_CSR, &result); in rio_enum_host()
249 if ((result & 0xffff) != port->host_deviceid) in rio_enum_host()
250 return -1; in rio_enum_host()
252 /* Set master port destid and init destid ctr */ in rio_enum_host()
253 rio_local_set_device_id(port, port->host_deviceid); in rio_enum_host()
258 * rio_device_has_destid- Test if a device contains a destination ID register
259 * @port: Master port to issue transaction
265 * destination ID register. Returns 1 if true or 0 if false.
267 static int rio_device_has_destid(struct rio_mport *port, int src_ops, in rio_device_has_destid() argument
276 * rio_release_dev- Frees a RIO device struct
291 * rio_is_switch- Tests if a RIO device has switch capabilities
301 if (rdev->pef & RIO_PEF_SWITCH) in rio_is_switch()
307 * rio_setup_device- Allocates and sets up a RIO device
309 * @port: Master port to send transactions
310 * @destid: Current destination ID
315 * space contents. If device has a destination ID register, a destination
316 * ID is either assigned in enumeration mode or read from configuration
323 struct rio_mport *port, u16 destid, in rio_setup_device() argument
334 if (rio_mport_read_config_32(port, destid, hopcount, in rio_setup_device()
339 rio_mport_read_config_32(port, destid, hopcount, in rio_setup_device()
349 rdev->net = net; in rio_setup_device()
350 rdev->pef = result; in rio_setup_device()
351 rdev->swpinfo = swpinfo; in rio_setup_device()
352 rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_ID_CAR, in rio_setup_device()
354 rdev->did = result >> 16; in rio_setup_device()
355 rdev->vid = result & 0xffff; in rio_setup_device()
356 rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_INFO_CAR, in rio_setup_device()
357 &rdev->device_rev); in rio_setup_device()
358 rio_mport_read_config_32(port, destid, hopcount, RIO_ASM_ID_CAR, in rio_setup_device()
360 rdev->asm_did = result >> 16; in rio_setup_device()
361 rdev->asm_vid = result & 0xffff; in rio_setup_device()
362 rio_mport_read_config_32(port, destid, hopcount, RIO_ASM_INFO_CAR, in rio_setup_device()
364 rdev->asm_rev = result >> 16; in rio_setup_device()
365 if (rdev->pef & RIO_PEF_EXT_FEATURES) { in rio_setup_device()
366 rdev->efptr = result & 0xffff; in rio_setup_device()
367 rdev->phys_efptr = rio_mport_get_physefb(port, 0, destid, in rio_setup_device()
368 hopcount, &rdev->phys_rmap); in rio_setup_device()
370 __func__, rdev->phys_rmap); in rio_setup_device()
372 rdev->em_efptr = rio_mport_get_feature(port, 0, destid, in rio_setup_device()
374 if (!rdev->em_efptr) in rio_setup_device()
375 rdev->em_efptr = rio_mport_get_feature(port, 0, destid, in rio_setup_device()
379 rio_mport_read_config_32(port, destid, hopcount, RIO_SRC_OPS_CAR, in rio_setup_device()
380 &rdev->src_ops); in rio_setup_device()
381 rio_mport_read_config_32(port, destid, hopcount, RIO_DST_OPS_CAR, in rio_setup_device()
382 &rdev->dst_ops); in rio_setup_device()
390 rio_mport_write_config_32(port, destid, hopcount, in rio_setup_device()
392 rdev->comp_tag = next_comptag++; in rio_setup_device()
393 rdev->do_enum = true; in rio_setup_device()
395 rio_mport_read_config_32(port, destid, hopcount, in rio_setup_device()
397 &rdev->comp_tag); in rio_setup_device()
400 if (rio_device_has_destid(port, rdev->src_ops, rdev->dst_ops)) { in rio_setup_device()
402 rio_set_device_id(port, destid, hopcount, next_destid); in rio_setup_device()
403 rdev->destid = next_destid; in rio_setup_device()
406 rdev->destid = rio_get_device_id(port, destid, hopcount); in rio_setup_device()
408 rdev->hopcount = 0xff; in rio_setup_device()
413 rdev->destid = destid; in rio_setup_device()
414 rdev->hopcount = hopcount; in rio_setup_device()
419 rswitch = rdev->rswitch; in rio_setup_device()
420 rswitch->port_ok = 0; in rio_setup_device()
421 spin_lock_init(&rswitch->lock); in rio_setup_device()
422 rswitch->route_table = in rio_setup_device()
423 kzalloc(RIO_MAX_ROUTE_ENTRIES(port->sys_size), in rio_setup_device()
425 if (!rswitch->route_table) in rio_setup_device()
428 for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES(port->sys_size); in rio_setup_device()
430 rswitch->route_table[rdid] = RIO_INVALID_ROUTE; in rio_setup_device()
431 dev_set_name(&rdev->dev, "%02x:s:%04x", rdev->net->id, in rio_setup_device()
432 rdev->comp_tag & RIO_CTAG_UDEVID); in rio_setup_device()
438 /*Enable Input Output Port (transmitter receiver)*/ in rio_setup_device()
439 rio_enable_rx_tx_port(port, 0, destid, hopcount, 0); in rio_setup_device()
441 dev_set_name(&rdev->dev, "%02x:e:%04x", rdev->net->id, in rio_setup_device()
442 rdev->comp_tag & RIO_CTAG_UDEVID); in rio_setup_device()
445 rdev->dev.parent = &net->dev; in rio_setup_device()
447 rdev->dev.release = rio_release_dev; in rio_setup_device()
448 rdev->dma_mask = DMA_BIT_MASK(32); in rio_setup_device()
449 rdev->dev.dma_mask = &rdev->dma_mask; in rio_setup_device()
450 rdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); in rio_setup_device()
452 if (rdev->dst_ops & RIO_DST_OPS_DOORBELL) in rio_setup_device()
453 rio_init_dbell_res(&rdev->riores[RIO_DOORBELL_RESOURCE], in rio_setup_device()
459 kfree(rswitch->route_table); in rio_setup_device()
460 put_device(&rdev->dev); in rio_setup_device()
470 kfree(rswitch->route_table); in rio_setup_device()
477 * rio_sport_is_active- Tests if a switch port has an active connection.
479 * @sp: Switch port number
481 * Reads the port error status CSR for a particular switch port to
482 * determine if the port has an active link. Returns
483 * %RIO_PORT_N_ERR_STS_PORT_OK if the port is active or %0 if it is
498 * rio_get_host_deviceid_lock- Reads the Host Device ID Lock CSR on a device
499 * @port: Master port to send transaction
502 * Used during enumeration to read the Host Device ID Lock CSR on a
505 static u16 rio_get_host_deviceid_lock(struct rio_mport *port, u8 hopcount) in rio_get_host_deviceid_lock() argument
509 rio_mport_read_config_32(port, RIO_ANY_DESTID(port->sys_size), hopcount, in rio_get_host_deviceid_lock()
516 * rio_enum_peer- Recursively enumerate a RIO network through a master port
518 * @port: Master port to send transactions
521 * @prev_port: Port on previous RIO device
524 * master port passed in @port.
526 static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, in rio_enum_peer() argument
533 if (rio_mport_chk_dev_access(port, in rio_enum_peer()
534 RIO_ANY_DESTID(port->sys_size), hopcount)) { in rio_enum_peer()
536 return -1; in rio_enum_peer()
539 if (rio_get_host_deviceid_lock(port, hopcount) == port->host_deviceid) { in rio_enum_peer()
545 rio_mport_read_config_32(port, RIO_ANY_DESTID(port->sys_size), in rio_enum_peer()
554 prev->rswitch->nextdev[prev_port] = rdev; in rio_enum_peer()
562 rio_mport_write_config_32(port, RIO_ANY_DESTID(port->sys_size), in rio_enum_peer()
564 RIO_HOST_DID_LOCK_CSR, port->host_deviceid); in rio_enum_peer()
565 while ((tmp = rio_get_host_deviceid_lock(port, hopcount)) in rio_enum_peer()
566 < port->host_deviceid) { in rio_enum_peer()
570 rio_mport_write_config_32(port, RIO_ANY_DESTID(port->sys_size), in rio_enum_peer()
573 port->host_deviceid); in rio_enum_peer()
576 if (rio_get_host_deviceid_lock(port, hopcount) > port->host_deviceid) { in rio_enum_peer()
579 return -1; in rio_enum_peer()
583 rdev = rio_setup_device(net, port, RIO_ANY_DESTID(port->sys_size), in rio_enum_peer()
586 rdev->prev = prev; in rio_enum_peer()
588 prev->rswitch->nextdev[prev_port] = rdev; in rio_enum_peer()
590 return -1; in rio_enum_peer()
599 sw_inport = RIO_GET_PORT_NUM(rdev->swpinfo); in rio_enum_peer()
601 port->host_deviceid, sw_inport, 0); in rio_enum_peer()
602 rdev->rswitch->route_table[port->host_deviceid] = sw_inport; in rio_enum_peer()
606 if (destid != port->host_deviceid) { in rio_enum_peer()
609 rdev->rswitch->route_table[destid] = sw_inport; in rio_enum_peer()
615 rio_name(rdev), rdev->vid, rdev->did, in rio_enum_peer()
616 RIO_GET_TOTAL_PORTS(rdev->swpinfo)); in rio_enum_peer()
619 port_num < RIO_GET_TOTAL_PORTS(rdev->swpinfo); in rio_enum_peer()
622 rio_enable_rx_tx_port(port, 0, in rio_enum_peer()
623 RIO_ANY_DESTID(port->sys_size), in rio_enum_peer()
625 rdev->rswitch->port_ok |= (1 << port_num); in rio_enum_peer()
633 "RIO: scanning device on port %d\n", in rio_enum_peer()
635 rio_enable_rx_tx_port(port, 0, in rio_enum_peer()
636 RIO_ANY_DESTID(port->sys_size), in rio_enum_peer()
638 rdev->rswitch->port_ok |= (1 << port_num); in rio_enum_peer()
640 RIO_ANY_DESTID(port->sys_size), in rio_enum_peer()
643 if (rio_enum_peer(net, port, hopcount + 1, in rio_enum_peer()
645 return -1; in rio_enum_peer()
652 if (destid != port->host_deviceid) { in rio_enum_peer()
658 rdev->rswitch-> in rio_enum_peer()
668 * set PORT_LOCKOUT bit for unused port in rio_enum_peer()
670 if (rdev->em_efptr) in rio_enum_peer()
673 rdev->rswitch->port_ok &= ~(1 << port_num); in rio_enum_peer()
677 /* Direct Port-write messages to the enumeratiing host */ in rio_enum_peer()
678 if ((rdev->src_ops & RIO_SRC_OPS_PORT_WRITE) && in rio_enum_peer()
679 (rdev->em_efptr)) { in rio_enum_peer()
681 rdev->em_efptr + RIO_EM_PW_TGT_DEVID, in rio_enum_peer()
682 (port->host_deviceid << 16) | in rio_enum_peer()
683 (port->sys_size << 15)); in rio_enum_peer()
692 rdev->destid = sw_destid; in rio_enum_peer()
695 rio_name(rdev), rdev->vid, rdev->did); in rio_enum_peer()
701 * rio_enum_complete- Tests if enumeration of a network is complete
702 * @port: Master port to send transaction
704 * Tests the PGCCSR discovered bit for non-zero value (enumeration
708 static int rio_enum_complete(struct rio_mport *port) in rio_enum_complete() argument
712 rio_local_read_config_32(port, port->phys_efptr + RIO_PORT_GEN_CTL_CSR, in rio_enum_complete()
718 * rio_disc_peer- Recursively discovers a RIO network through a master port
720 * @port: Master port to send transactions
721 * @destid: Current destination ID in network
724 * @prev_port: previous port number
727 * master port passed in @port.
730 rio_disc_peer(struct rio_net *net, struct rio_mport *port, u16 destid, in rio_disc_peer() argument
738 if ((rdev = rio_setup_device(net, port, destid, hopcount, 0))) { in rio_disc_peer()
739 rdev->prev = prev; in rio_disc_peer()
741 prev->rswitch->nextdev[prev_port] = rdev; in rio_disc_peer()
743 return -1; in rio_disc_peer()
747 rdev->destid = destid; in rio_disc_peer()
751 rio_name(rdev), rdev->vid, rdev->did, in rio_disc_peer()
752 RIO_GET_TOTAL_PORTS(rdev->swpinfo)); in rio_disc_peer()
754 port_num < RIO_GET_TOTAL_PORTS(rdev->swpinfo); in rio_disc_peer()
756 if (RIO_GET_PORT_NUM(rdev->swpinfo) == port_num) in rio_disc_peer()
761 "RIO: scanning device on port %d\n", in rio_disc_peer()
764 rio_lock_device(port, destid, hopcount, 1000); in rio_disc_peer()
767 ndestid < RIO_ANY_DESTID(port->sys_size); in rio_disc_peer()
777 if (ndestid == RIO_ANY_DESTID(port->sys_size)) in rio_disc_peer()
779 rio_unlock_device(port, destid, hopcount); in rio_disc_peer()
780 if (rio_disc_peer(net, port, ndestid, in rio_disc_peer()
782 return -1; in rio_disc_peer()
787 rio_name(rdev), rdev->vid, rdev->did); in rio_disc_peer()
793 * rio_mport_is_active- Tests if master port link is active
794 * @port: Master port to test
796 * Reads the port error status CSR for the master port to
797 * determine if the port has an active link. Returns
798 * %RIO_PORT_N_ERR_STS_PORT_OK if the master port is active
801 static int rio_mport_is_active(struct rio_mport *port) in rio_mport_is_active() argument
805 rio_local_read_config_32(port, in rio_mport_is_active()
806 port->phys_efptr + in rio_mport_is_active()
807 RIO_PORT_N_ERR_STS_CSR(port->index, port->phys_rmap), in rio_mport_is_active()
814 pr_debug("RIO-SCAN: %s: net_%d\n", __func__, net->id); in rio_scan_release_net()
815 kfree(net->enum_data); in rio_scan_release_net()
823 pr_debug("RIO-SCAN: %s: net_%d\n", __func__, net->id); in rio_scan_release_dev()
828 * rio_scan_alloc_net - Allocate and configure a new RIO network
829 * @mport: Master port associated with the RIO network
831 * @start: logical minimal start id for new net
833 * Allocates a new RIO network structure and initializes enumerator-specific
850 RIO_MAX_ROUTE_ENTRIES(mport->sys_size) in rio_scan_alloc_net()
860 net->enum_data = idtab; in rio_scan_alloc_net()
861 net->release = rio_scan_release_net; in rio_scan_alloc_net()
862 idtab->start = start; in rio_scan_alloc_net()
863 idtab->max = RIO_MAX_ROUTE_ENTRIES(mport->sys_size); in rio_scan_alloc_net()
864 spin_lock_init(&idtab->lock); in rio_scan_alloc_net()
869 net->id = mport->id; in rio_scan_alloc_net()
870 net->hport = mport; in rio_scan_alloc_net()
871 dev_set_name(&net->dev, "rnet_%d", net->id); in rio_scan_alloc_net()
872 net->dev.parent = &mport->dev; in rio_scan_alloc_net()
873 net->dev.release = rio_scan_release_dev; in rio_scan_alloc_net()
881 * rio_update_route_tables- Updates route tables in switches
895 list_for_each_entry(rdev, &net->devices, net_list) { in rio_update_route_tables()
897 destid = rdev->destid; in rio_update_route_tables()
899 list_for_each_entry(rswitch, &net->switches, node) { in rio_update_route_tables()
901 if (rio_is_switch(rdev) && (rdev->rswitch == rswitch)) in rio_update_route_tables()
904 if (RIO_INVALID_ROUTE == rswitch->route_table[destid]) { in rio_update_route_tables()
908 if (swrdev->destid == destid) in rio_update_route_tables()
911 sport = RIO_GET_PORT_NUM(swrdev->swpinfo); in rio_update_route_tables()
915 rswitch->route_table[destid] = sport; in rio_update_route_tables()
922 * rio_init_em - Initializes RIO Error Management (for switches)
925 * For each enumerated switch, call device-specific error management
930 if (rio_is_switch(rdev) && (rdev->em_efptr) && in rio_init_em()
931 rdev->rswitch->ops && rdev->rswitch->ops->em_init) { in rio_init_em()
932 rdev->rswitch->ops->em_init(rdev); in rio_init_em()
937 * rio_enum_mport- Start enumeration through a master port
938 * @mport: Master port to send transactions
942 * master port device, then give up. If not and we have an active
944 * enumeration succeeds or %-EBUSY if enumeration fails.
951 printk(KERN_INFO "RIO: enumerate master port %d, %s\n", mport->id, in rio_enum_mport()
952 mport->name); in rio_enum_mport()
960 if (mport->nnode.next || mport->nnode.prev) in rio_enum_mport()
961 return -EBUSY; in rio_enum_mport()
963 /* If somebody else enumerated our master port device, bail. */ in rio_enum_mport()
966 "RIO: master port %d device has been enumerated by a remote host\n", in rio_enum_mport()
967 mport->id); in rio_enum_mport()
968 rc = -EBUSY; in rio_enum_mport()
972 /* If master port has an active link, allocate net and enum peers */ in rio_enum_mport()
977 rc = -ENOMEM; in rio_enum_mport()
982 rio_destid_reserve(net, mport->host_deviceid); in rio_enum_mport()
984 /* Enable Input Output Port (transmitter receiver) */ in rio_enum_mport()
996 "RIO: master port %d device has lost enumeration to a remote host\n", in rio_enum_mport()
997 mport->id); in rio_enum_mport()
999 rc = -EBUSY; in rio_enum_mport()
1008 printk(KERN_INFO "RIO: master port %d link inactive\n", in rio_enum_mport()
1009 mport->id); in rio_enum_mport()
1010 rc = -EINVAL; in rio_enum_mport()
1018 * rio_build_route_tables- Generate route tables from switch route entries
1031 list_for_each_entry(rswitch, &net->switches, node) { in rio_build_route_tables()
1034 rio_lock_device(net->hport, rdev->destid, in rio_build_route_tables()
1035 rdev->hopcount, 1000); in rio_build_route_tables()
1037 i < RIO_MAX_ROUTE_ENTRIES(net->hport->sys_size); in rio_build_route_tables()
1042 rswitch->route_table[i] = sport; in rio_build_route_tables()
1045 rio_unlock_device(net->hport, rdev->destid, rdev->hopcount); in rio_build_route_tables()
1050 * rio_disc_mport- Start discovery through a master port
1051 * @mport: Master port to send transactions
1058 * peer discovery. Returns %0 if discovery succeeds or %-EBUSY
1066 printk(KERN_INFO "RIO: discover master port %d, %s\n", mport->id, in rio_disc_mport()
1067 mport->name); in rio_disc_mport()
1069 /* If master port has an active link, allocate net and discover peers */ in rio_disc_mport()
1074 return -EAGAIN; in rio_disc_mport()
1086 mport->id, mport->name); in rio_disc_mport()
1099 &mport->host_deviceid); in rio_disc_mport()
1100 mport->host_deviceid = RIO_GET_DID(mport->sys_size, in rio_disc_mport()
1101 mport->host_deviceid); in rio_disc_mport()
1103 if (rio_disc_peer(net, mport, RIO_ANY_DESTID(mport->sys_size), in rio_disc_mport()
1106 "RIO: master port %d device has failed discovery\n", in rio_disc_mport()
1107 mport->id); in rio_disc_mport()
1116 return -EBUSY; in rio_disc_mport()
1138 * Returns 0 for success or -EIO if unable to register itself.
1147 return -EIO; in rio_basic_attach()