• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/rapidio/

Lines Matching defs:rswitch

275 		rdev->rswitch->add_entry = rio_std_route_add_entry;
276 rdev->rswitch->get_entry = rio_std_route_get_entry;
277 rdev->rswitch->clr_table = rio_std_route_clr_table;
280 if (!rdev->rswitch->add_entry || !rdev->rswitch->get_entry)
391 struct rio_switch *rswitch = NULL;
444 rswitch = kzalloc(sizeof(struct rio_switch), GFP_KERNEL);
445 if (!rswitch)
447 rswitch->switchid = next_switchid;
448 rswitch->hopcount = hopcount;
449 rswitch->destid = destid;
450 rswitch->port_ok = 0;
451 rswitch->route_table = kzalloc(sizeof(u8)*
454 if (!rswitch->route_table)
459 rswitch->route_table[rdid] = RIO_INVALID_ROUTE;
460 rdev->rswitch = rswitch;
462 rdev->rswitch->switchid);
465 if (do_enum && rdev->rswitch->clr_table)
466 rdev->rswitch->clr_table(port, destid, hopcount,
469 list_add_tail(&rswitch->node, &rio_switches);
502 if (rswitch) {
503 kfree(rswitch->route_table);
504 kfree(rswitch);
629 * @rswitch: Switch device
643 rio_route_add_entry(struct rio_mport *mport, struct rio_switch *rswitch,
649 rc = rio_lock_device(mport, rswitch->destid,
650 rswitch->hopcount, 1000);
655 rc = rswitch->add_entry(mport, rswitch->destid,
656 rswitch->hopcount, table,
659 rio_unlock_device(mport, rswitch->destid, rswitch->hopcount);
667 * @rswitch: Switch device
681 rio_route_get_entry(struct rio_mport *mport, struct rio_switch *rswitch, u16 table,
687 rc = rio_lock_device(mport, rswitch->destid,
688 rswitch->hopcount, 1000);
693 rc = rswitch->get_entry(mport, rswitch->destid,
694 rswitch->hopcount, table,
697 rio_unlock_device(mport, rswitch->destid, rswitch->hopcount);
838 rio_route_add_entry(port, rdev->rswitch, RIO_GLOBAL_TABLE,
840 rdev->rswitch->route_table[port->host_deviceid] = sw_inport;
845 rio_route_add_entry(port, rdev->rswitch, RIO_GLOBAL_TABLE,
847 rdev->rswitch->route_table[destid] = sw_inport;
864 rdev->rswitch->port_ok |= (1 << port_num);
876 rdev->rswitch->port_ok |= (1 << port_num);
877 rio_route_add_entry(port, rdev->rswitch,
891 rio_route_add_entry(port, rdev->rswitch,
896 rdev->rswitch->
908 rdev->rswitch->port_ok &= ~(1 << port_num);
930 rdev->rswitch->destid = sw_destid;
984 rdev->rswitch->destid = destid;
1006 rio_route_get_entry(port, rdev->rswitch,
1093 struct rio_switch *rswitch;
1099 destid = (rio_is_switch(rdev))?rdev->rswitch->destid:rdev->destid;
1101 list_for_each_entry(rswitch, &rio_switches, node) {
1103 if (rio_is_switch(rdev) && (rdev->rswitch == rswitch))
1106 if (RIO_INVALID_ROUTE == rswitch->route_table[destid]) {
1108 if (rswitch->destid == destid)
1112 rswitch->destid, rswitch->hopcount);
1114 if (rswitch->add_entry) {
1115 rio_route_add_entry(port, rswitch,
1118 rswitch->route_table[destid] = sport;
1135 (rdev->rswitch->em_init)) {
1136 rdev->rswitch->em_init(rdev);
1223 rio_lock_device(rdev->net->hport, rdev->rswitch->destid,
1224 rdev->rswitch->hopcount, 1000);
1229 (rdev->net->hport, rdev->rswitch,
1232 rdev->rswitch->route_table[i] = sport;
1236 rdev->rswitch->destid,
1237 rdev->rswitch->hopcount);