Lines Matching refs:port

65  * rio_local_get_device_id - Get the base/extended device id for a port
66 * @port: RIO master port from which to get the deviceid
69 * implementing the master port. Returns the 8/16-bit device
72 u16 rio_local_get_device_id(struct rio_mport *port)
76 rio_local_read_config_32(port, RIO_DID_CSR, &result);
78 return (RIO_GET_DID(port->sys_size, result));
84 * @port: mport device to query
90 int rio_query_mport(struct rio_mport *port,
93 if (!port->ops->query_mport)
95 return port->ops->query_mport(port, mport_attr);
101 * @mport: Master port associated with the RIO network
104 * list heads, and adds the associated master port to the
151 * rio_local_set_device_id - Set the base/extended device id for a port
152 * @port: RIO master port
157 void rio_local_set_device_id(struct rio_mport *port, u16 did)
159 rio_local_write_config_32(port, RIO_DID_CSR,
160 RIO_SET_DID(port->sys_size, did));
223 * @mport: RIO master port from which to allocate the mailbox resource
279 * @mport: RIO master port from which to release the mailbox resource
308 * @mport: RIO master port from which to allocate the mailbox resource
363 * @mport: RIO master port from which to release the mailbox resource
392 * @mport: RIO master port to bind the doorbell callback
397 * Adds a doorbell resource/callback pair into a port's
423 * @mport: RIO master port from which to allocate the doorbell resource
466 * @mport: RIO master port from which to release the doorbell resource
554 * rio_add_mport_pw_handler - add port-write message handler into the list
556 * @mport: RIO master port to bind the portwrite callback
581 * rio_del_mport_pw_handler - remove port-write message handler from the list
583 * @mport: RIO master port to bind the portwrite callback
612 * rio_request_inb_pwrite - request inbound port-write message service for
614 * @rdev: RIO device to which register inbound port-write callback routine
615 * @pwcback: Callback routine to execute when port-write is received
617 * Binds a port-write callback function to the RapidIO device.
637 * rio_release_inb_pwrite - release inbound port-write message service
639 * @rdev: RIO device which registered for inbound port-write callback
660 * rio_pw_enable - Enables/disables port-write handling by a master port
661 * @mport: Master port associated with port-write handling
679 * @mport: Master port.
706 * @mport: Master port
722 * @mport: Master port.
753 * @mport: Master port
773 * @port: Master port to issue transaction
774 * @local: Indicate a local master port or remote device access
780 rio_mport_get_physefb(struct rio_mport *port, int local,
786 ext_ftr_ptr = rio_mport_get_efb(port, local, destid, hopcount, 0);
790 rio_local_read_config_32(port, ext_ftr_ptr,
793 rio_mport_read_config_32(port, destid, hopcount,
820 ext_ftr_ptr = rio_mport_get_efb(port, local, destid,
862 * rio_set_port_lockout - Sets/clears LOCKOUT bit (RIO EM 1.3) for a switch port.
864 * @pnum: Switch port number to set LOCKOUT bit
888 * given port
889 * @port: Master port associated with the RIO network
890 * @local: local=1 select local port otherwise a far device is reached
898 int rio_enable_rx_tx_port(struct rio_mport *port,
908 * enable rx input tx output port
913 ext_ftr_ptr = rio_mport_get_physefb(port, local, destid,
917 rio_local_read_config_32(port,
921 if (rio_mport_read_config_32(port, destid, hopcount,
930 rio_local_write_config_32(port,
933 if (rio_mport_write_config_32(port, destid, hopcount,
948 * @npnum: nrdev's port number on the route to rdev
951 * device (and corresponding RIO port) on the route.
988 * @mport: Master port to send transactions
1024 * @pnum: Device port number to issue the command
1067 * rio_clr_err_stopped - Clears port Error-stopped states.
1069 * @pnum: Switch port number to clear errors
1070 * @err_status: port error status (if 0 reads register from device)
1077 * issues soft port reset to the port to reset ERR_STOP bits and ackIDs.
1163 * rio_inb_pwrite_handler - inbound port-write message handler
1164 * @mport: mport device associated with port-write
1165 * @pw_msg: pointer to inbound port-write message
1167 * Processes an inbound port-write message. Returns 0 if the request
1200 * port-write messages. End-point messages expected to be handled
1232 * This will replace device and port reported in PW message.
1254 * Process the port-write notification from switch
1337 * @port: Master port to issue transaction
1338 * @local: Indicate a local master port or remote device access
1345 rio_mport_get_efb(struct rio_mport *port, int local, u16 destid,
1352 rio_local_read_config_32(port, RIO_ASM_INFO_CAR,
1355 rio_mport_read_config_32(port, destid, hopcount,
1360 rio_local_read_config_32(port, from, &reg_val);
1362 rio_mport_read_config_32(port, destid, hopcount,
1371 * @port: Master port to issue transaction
1372 * @local: Indicate a local master port or remote device access
1383 rio_mport_get_feature(struct rio_mport * port, int local, u16 destid,
1389 rio_local_read_config_32(port, RIO_ASM_INFO_CAR, &asm_info);
1391 rio_mport_read_config_32(port, destid, hopcount,
1398 rio_local_read_config_32(port, ext_ftr_ptr,
1401 rio_mport_read_config_32(port, destid, hopcount,
1483 * @mport: Master port to issue transaction
1486 * @table: routing table ID (global or port-specific)
1488 * @route_port: destination port for specified destID
1508 * rio_std_route_get_entry - Read switch route table entry (port number)
1511 * @mport: Master port to issue transaction
1514 * @table: routing table ID (global or port-specific)
1516 * @route_port: returned destination port for specified destID
1539 * @mport: Master port to issue transaction
1542 * @table: routing table ID (global or port-specific)
1589 * @port: Master port to send transaction
1597 int rio_lock_device(struct rio_mport *port, u16 destid,
1604 rio_mport_write_config_32(port, destid, hopcount,
1605 RIO_HOST_DID_LOCK_CSR, port->host_deviceid);
1606 rio_mport_read_config_32(port, destid, hopcount,
1609 while (result != port->host_deviceid) {
1620 rio_mport_write_config_32(port, destid,
1623 port->host_deviceid);
1624 rio_mport_read_config_32(port, destid,
1635 * @port: Master port to send transaction
1641 int rio_unlock_device(struct rio_mport *port, u16 destid, u8 hopcount)
1646 rio_mport_write_config_32(port, destid,
1649 port->host_deviceid);
1650 rio_mport_read_config_32(port, destid, hopcount,
1673 * using the @table argument if a switch has per port routing tables or
1720 * @route_port: Pointer to read port number into
1726 * using the @table argument if a switch has per port routing tables or
1776 * argument if a switch has per port routing tables or the standard (or global)
1938 struct rio_mport *port;
1941 list_for_each_entry(port, &rio_mports, node) {
1942 if (port->id == mport_id)
1945 port = NULL;
1949 return port;
1967 struct rio_mport *port;
2012 list_for_each_entry(port, &rio_mports, node) {
2013 if (port->id == mport_id) {
2014 port->nscan = scan_ops;
2016 } else if (mport_id == RIO_MPORT_ANY && !port->nscan)
2017 port->nscan = scan_ops;
2042 struct rio_mport *port;
2052 list_for_each_entry(port, &rio_mports, node)
2053 if (port->id == mport_id ||
2054 (mport_id == RIO_MPORT_ANY && port->nscan == scan_ops))
2055 port->nscan = NULL;
2077 struct rio_mport *port = NULL;
2081 list_for_each_entry(port, &rio_mports, node) {
2082 if (port->id == mport_id)
2088 if (!port->nscan) {
2093 if (!try_module_get(port->nscan->owner)) {
2100 if (port->host_deviceid >= 0)
2101 rc = port->nscan->enumerate(port, 0);
2103 rc = port->nscan->discover(port, RIO_SCAN_ENUM_NO_WAIT);
2105 module_put(port->nscan->owner);
2145 struct rio_mport *port;
2157 list_for_each_entry(port, &rio_mports, node) {
2158 if (port->host_deviceid >= 0) {
2159 if (port->nscan && try_module_get(port->nscan->owner)) {
2160 port->nscan->enumerate(port, 0);
2161 module_put(port->nscan->owner);
2193 list_for_each_entry(port, &rio_mports, node) {
2194 if (port->host_deviceid < 0 && port->nscan) {
2195 work[n].mport = port;
2242 int rio_register_mport(struct rio_mport *port)
2254 if (port->id == scan->mport_id ||
2256 port->nscan = scan->ops;
2257 if (port->id == scan->mport_id)
2262 list_add_tail(&port->node, &rio_mports);
2265 dev_set_name(&port->dev, "rapidio%d", port->id);
2266 port->dev.class = &rio_mport_class;
2267 atomic_set(&port->state, RIO_DEVICE_RUNNING);
2269 res = device_register(&port->dev);
2271 dev_err(&port->dev, "RIO: mport%d registration failed ERR=%d\n",
2272 port->id, res);
2274 list_del(&port->node);
2276 put_device(&port->dev);
2278 dev_dbg(&port->dev, "RIO: registered mport%d\n", port->id);
2304 int rio_unregister_mport(struct rio_mport *port)
2306 pr_debug("RIO: %s %s id=%d\n", __func__, port->name, port->id);
2309 if (atomic_cmpxchg(&port->state,
2313 __func__, port->name);
2316 if (port->net && port->net->hport == port) {
2317 rio_net_remove_children(port->net);
2318 rio_free_net(port->net);
2326 list_del(&port->node);
2328 device_unregister(&port->dev);