Lines Matching refs:host

84 	struct hpsb_host *host;  member
128 NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid); in raw1394_read_proc()
142 if (ne->host != NULL && ne->host->node_id == ne->nodeid) { in raw1394_read_proc()
144 PUTF(" Host Driver : %s\n", ne->host->driver->name); in raw1394_read_proc()
145 PUTF(" Nodes connected : %d\n", ne->host->node_count); in raw1394_read_proc()
146 PUTF(" Nodes active : %d\n", ne->host->nodes_active); in raw1394_read_proc()
147 PUTF(" SelfIDs received: %d\n", ne->host->selfid_count); in raw1394_read_proc()
149 NODE_BUS_ARGS(ne->host, ne->host->irm_id)); in raw1394_read_proc()
151 NODE_BUS_ARGS(ne->host, ne->host->busmgr_id)); in raw1394_read_proc()
152 PUTF(" In Bus Reset : %s\n", ne->host->in_bus_reset ? "yes" : "no"); in raw1394_read_proc()
153 PUTF(" Root : %s\n", ne->host->is_root ? "yes" : "no"); in raw1394_read_proc()
154 PUTF(" Cycle Master : %s\n", ne->host->is_cycmst ? "yes" : "no"); in raw1394_read_proc()
155 PUTF(" IRM : %s\n", ne->host->is_irm ? "yes" : "no"); in raw1394_read_proc()
156 PUTF(" Bus Manager : %s\n", ne->host->is_busmgr ? "yes" : "no"); in raw1394_read_proc()
216 static int nodemgr_read_quadlet(struct hpsb_host *host, in nodemgr_read_quadlet() argument
224 ret = hpsb_read(host, nodeid, generation, address, quad, 4); in nodemgr_read_quadlet()
237 static int nodemgr_size_text_leaf(struct hpsb_host *host, in nodemgr_size_text_leaf() argument
244 if (nodemgr_read_quadlet(host, nodeid, generation, address, &quad)) in nodemgr_size_text_leaf()
250 if (nodemgr_read_quadlet(host, nodeid, generation, address, &quad)) in nodemgr_size_text_leaf()
266 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, address, &quad) in nodemgr_read_text_leaf()
272 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, address, &quad)) in nodemgr_read_text_leaf()
282 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, address, quadp)) in nodemgr_read_text_leaf()
302 (struct hpsb_host *host, nodeid_t nodeid, unsigned int generation) in nodemgr_scan_root_directory() argument
312 if (nodemgr_read_quadlet(host, nodeid, generation, address, &quad)) in nodemgr_scan_root_directory()
320 if (nodemgr_read_quadlet(host, nodeid, generation, address, &quad)) in nodemgr_scan_root_directory()
328 if (nodemgr_read_quadlet(host, nodeid, generation, address, &quad)) in nodemgr_scan_root_directory()
335 size = nodemgr_size_text_leaf(host, nodeid, generation, in nodemgr_scan_root_directory()
366 struct hpsb_host *host = hi->host; in nodemgr_create_node() local
369 ne = nodemgr_scan_root_directory (host, nodeid, generation); in nodemgr_create_node()
374 ne->host = host; in nodemgr_create_node()
386 (host->node_id == nodeid) ? "Host" : "Node", in nodemgr_create_node()
387 NODE_BUS_ARGS(host, nodeid), (unsigned long long)guid); in nodemgr_create_node()
405 static struct node_entry *find_entry_by_nodeid(struct hpsb_host *host, nodeid_t nodeid) in find_entry_by_nodeid() argument
412 if (ne->nodeid == nodeid && ne->host == host) in find_entry_by_nodeid()
428 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, address, &quad)) in nodemgr_scan_unit_directory()
443 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, in nodemgr_scan_unit_directory()
481 size = nodemgr_size_text_leaf(ne->host, in nodemgr_scan_unit_directory()
540 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, in nodemgr_process_unit_directory()
552 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, in nodemgr_process_unit_directory()
680 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, in nodemgr_process_root_directory()
685 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, in nodemgr_process_root_directory()
694 if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation, in nodemgr_process_root_directory()
1026 NODE_BUS_ARGS(ne->host, ne->nodeid), in nodemgr_update_node()
1027 NODE_BUS_ARGS(ne->host, nodeid)); in nodemgr_update_node()
1043 static int read_businfo_block(struct hpsb_host *host, nodeid_t nodeid, unsigned int generation, in read_businfo_block() argument
1056 NODE_BUS_ARGS(host, nodeid)); in read_businfo_block()
1066 if (nodemgr_read_quadlet(host, nodeid, generation, in read_businfo_block()
1069 NODE_BUS_FMT, NODE_BUS_ARGS(host, nodeid)); in read_businfo_block()
1086 NODE_BUS_ARGS(host, nodeid), buffer[0] & 0x00ffffff); in read_businfo_block()
1093 NODE_BUS_ARGS(host, nodeid), header_size); in read_businfo_block()
1098 if (nodemgr_read_quadlet(host, nodeid, generation, in read_businfo_block()
1102 NODE_BUS_ARGS(host, nodeid)); in read_businfo_block()
1113 NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid); in nodemgr_remove_node()
1127 struct hpsb_host *host = hi->host; in nodemgr_node_probe_one() local
1135 if (read_businfo_block (host, nodeid, generation, in nodemgr_node_probe_one()
1148 NODE_BUS_ARGS(host, nodeid), buffer[1]); in nodemgr_node_probe_one()
1162 static void nodemgr_node_probe_cleanup(struct hpsb_host *host, unsigned int generation) in nodemgr_node_probe_cleanup() argument
1173 if (ne->host != host) in nodemgr_node_probe_cleanup()
1190 struct hpsb_host *host = hi->host; in nodemgr_node_probe() local
1191 struct selfid *sid = (struct selfid *)host->topology_map; in nodemgr_node_probe()
1195 for (count = host->selfid_count; count; count--, sid++) { in nodemgr_node_probe()
1212 if (generation == get_hpsb_generation(host)) in nodemgr_node_probe()
1213 nodemgr_node_probe_cleanup(host, generation); in nodemgr_node_probe()
1221 static void nodemgr_do_irm_duties(struct hpsb_host *host) in nodemgr_do_irm_duties() argument
1225 if (!host->is_irm) in nodemgr_do_irm_duties()
1228 host->csr.broadcast_channel |= 0x40000000; /* set validity bit */ in nodemgr_do_irm_duties()
1230 bc = cpu_to_be32(host->csr.broadcast_channel); in nodemgr_do_irm_duties()
1232 hpsb_write(host, LOCAL_BUS | ALL_NODES, get_hpsb_generation(host), in nodemgr_do_irm_duties()
1239 if (host->busmgr_id == 0xffff && host->node_count > 1) in nodemgr_do_irm_duties()
1241 u16 root_node = host->node_count - 1; in nodemgr_do_irm_duties()
1242 struct node_entry *ne = find_entry_by_nodeid(host, root_node | LOCAL_BUS); in nodemgr_do_irm_duties()
1245 hpsb_send_phy_config(host, root_node, -1); in nodemgr_do_irm_duties()
1249 hpsb_send_phy_config(host, NODEID_TO_NODE(host->node_id), -1); in nodemgr_do_irm_duties()
1250 hpsb_reset_bus(host, LONG_RESET_FORCE_ROOT); in nodemgr_do_irm_duties()
1258 static int nodemgr_check_irm_capability(struct hpsb_host *host, int cycles) in nodemgr_check_irm_capability() argument
1263 if (host->is_irm) in nodemgr_check_irm_capability()
1266 status = hpsb_read(host, LOCAL_BUS | (host->irm_id), in nodemgr_check_irm_capability()
1267 get_hpsb_generation(host), in nodemgr_check_irm_capability()
1282 hpsb_send_phy_config(host, NODEID_TO_NODE(host->node_id), -1); in nodemgr_check_irm_capability()
1283 hpsb_reset_bus(host, LONG_RESET_FORCE_ROOT); in nodemgr_check_irm_capability()
1294 struct hpsb_host *host = hi->host; in nodemgr_host_thread() local
1323 generation = get_hpsb_generation(host); in nodemgr_host_thread()
1331 if (!nodemgr_check_irm_capability(host, reset_cycles++)) { in nodemgr_host_thread()
1340 nodemgr_do_irm_duties(host); in nodemgr_host_thread()
1362 struct node_entry *hpsb_nodeid_get_entry(struct hpsb_host *host, nodeid_t nodeid) in hpsb_nodeid_get_entry() argument
1367 ne = find_entry_by_nodeid(host, nodeid); in hpsb_nodeid_get_entry()
1390 pkt->host = ne->host; in hpsb_node_fill_packet()
1402 return hpsb_read(ne->host, ne->nodeid, generation, in hpsb_node_read()
1412 return hpsb_write(ne->host, ne->nodeid, generation, in hpsb_node_write()
1422 return hpsb_lock(ne->host, ne->nodeid, generation, in hpsb_node_lock()
1426 static void nodemgr_add_host(struct hpsb_host *host) in nodemgr_add_host() argument
1430 hi = hpsb_create_hostinfo(&nodemgr_highlevel, host, sizeof(*hi)); in nodemgr_add_host()
1437 hi->host = host; in nodemgr_add_host()
1441 sprintf(hi->daemon_name, "knodemgrd_%d", host->id); in nodemgr_add_host()
1448 hi->daemon_name, host->driver->name); in nodemgr_add_host()
1449 hpsb_destroy_hostinfo(&nodemgr_highlevel, host); in nodemgr_add_host()
1456 static void nodemgr_host_reset(struct hpsb_host *host) in nodemgr_host_reset() argument
1458 struct host_info *hi = hpsb_get_hostinfo(&nodemgr_highlevel, host); in nodemgr_host_reset()
1469 static void nodemgr_remove_host(struct hpsb_host *host) in nodemgr_remove_host() argument
1473 struct host_info *hi = hpsb_get_hostinfo(&nodemgr_highlevel, host); in nodemgr_remove_host()
1482 host->driver->name); in nodemgr_remove_host()
1491 if (ne->host == host) in nodemgr_remove_host()