/* Reads the base/extended device id from the local device implementing the master port. Returns the 8/16-bit device id.  */
u16 rio_local_get_device_id(struct rio_mport *port)
/* Reads the base/extended device id from the local device implementing the master port. Returns the 8/16-bit device id.  */
u16 rio_local_get_device_id(struct rio_mport *port)
{
	u32 result;
	rio_local_read_config_32(port, RIO_DID_CSR, &result);
	return (RIO_GET_DID(port->sys_size, result));
}