Searched refs:slave (Results 1 - 200 of 929) sorted by relevance

12345

/linux-4.1.27/drivers/gpu/drm/armada/
H A Darmada_slave.c23 struct drm_encoder_slave *slave = to_encoder_slave(enc); armada_drm_slave_get_modes() local
25 count = slave->slave_funcs->get_modes(enc, conn); armada_drm_slave_get_modes()
33 struct drm_encoder_slave *slave = to_encoder_slave(enc); armada_drm_slave_destroy() local
36 if (slave->slave_funcs) armada_drm_slave_destroy()
37 slave->slave_funcs->destroy(enc); armada_drm_slave_destroy()
41 drm_encoder_cleanup(&slave->base); armada_drm_slave_destroy()
42 kfree(slave); armada_drm_slave_destroy()
70 struct drm_encoder_slave *slave; armada_drm_conn_slave_create() local
80 slave = kzalloc(sizeof(*slave), GFP_KERNEL); armada_drm_conn_slave_create()
81 if (!slave) armada_drm_conn_slave_create()
84 slave->base.possible_crtcs = config->crtcs; armada_drm_conn_slave_create()
88 kfree(slave); armada_drm_conn_slave_create()
92 ret = drm_encoder_init(conn->dev, &slave->base, armada_drm_conn_slave_create()
98 kfree(slave); armada_drm_conn_slave_create()
102 ret = drm_i2c_encoder_init(conn->dev, slave, adap, &config->info); armada_drm_conn_slave_create()
105 DRM_ERROR("unable to init encoder slave\n"); armada_drm_conn_slave_create()
106 armada_drm_slave_destroy(&slave->base); armada_drm_conn_slave_create()
110 drm_encoder_helper_add(&slave->base, &drm_slave_encoder_helpers); armada_drm_conn_slave_create()
112 ret = slave->slave_funcs->create_resources(&slave->base, conn); armada_drm_conn_slave_create()
114 armada_drm_slave_destroy(&slave->base); armada_drm_conn_slave_create()
118 ret = drm_mode_connector_attach_encoder(conn, &slave->base); armada_drm_conn_slave_create()
120 armada_drm_slave_destroy(&slave->base); armada_drm_conn_slave_create()
124 conn->encoder = &slave->base; armada_drm_conn_slave_create()
H A Darmada_output.c99 struct drm_encoder_slave *slave = to_encoder_slave(encoder); armada_drm_slave_encoder_mode_valid() local
101 valid = slave->slave_funcs->mode_valid(encoder, mode); armada_drm_slave_encoder_mode_valid()
113 struct drm_encoder_slave *slave = to_encoder_slave(encoder); armada_drm_slave_encoder_set_property() local
115 rc = slave->slave_funcs->set_property(encoder, conn, property, armada_drm_slave_encoder_set_property()
/linux-4.1.27/drivers/net/bonding/
H A Dbond_sysfs_slave.c19 ssize_t (*show)(struct slave *, char *);
31 static ssize_t state_show(struct slave *slave, char *buf) state_show() argument
33 switch (bond_slave_state(slave)) { state_show()
44 static ssize_t mii_status_show(struct slave *slave, char *buf) mii_status_show() argument
46 return sprintf(buf, "%s\n", bond_slave_link_status(slave->link)); mii_status_show()
50 static ssize_t link_failure_count_show(struct slave *slave, char *buf) link_failure_count_show() argument
52 return sprintf(buf, "%d\n", slave->link_failure_count); link_failure_count_show()
56 static ssize_t perm_hwaddr_show(struct slave *slave, char *buf) perm_hwaddr_show() argument
58 return sprintf(buf, "%pM\n", slave->perm_hwaddr); perm_hwaddr_show()
62 static ssize_t queue_id_show(struct slave *slave, char *buf) queue_id_show() argument
64 return sprintf(buf, "%d\n", slave->queue_id); queue_id_show()
68 static ssize_t ad_aggregator_id_show(struct slave *slave, char *buf) ad_aggregator_id_show() argument
72 if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) { ad_aggregator_id_show()
73 agg = SLAVE_AD_INFO(slave)->port.aggregator; ad_aggregator_id_show()
94 #define to_slave(obj) container_of(obj, struct slave, kobj)
100 struct slave *slave = to_slave(kobj); slave_show() local
102 return slave_attr->show(slave, buf); slave_show()
115 int bond_sysfs_slave_add(struct slave *slave) bond_sysfs_slave_add() argument
120 err = kobject_init_and_add(&slave->kobj, &slave_ktype, bond_sysfs_slave_add()
121 &(slave->dev->dev.kobj), "bonding_slave"); bond_sysfs_slave_add()
126 err = sysfs_create_file(&slave->kobj, &((*a)->attr)); bond_sysfs_slave_add()
128 kobject_put(&slave->kobj); bond_sysfs_slave_add()
136 void bond_sysfs_slave_del(struct slave *slave) bond_sysfs_slave_del() argument
141 sysfs_remove_file(&slave->kobj, &((*a)->attr)); bond_sysfs_slave_del()
143 kobject_put(&slave->kobj); bond_sysfs_slave_del()
H A Dbond_alb.c83 static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[],
116 static inline void tlb_init_slave(struct slave *slave) tlb_init_slave() argument
118 SLAVE_TLB_INFO(slave).load = 0; tlb_init_slave()
119 SLAVE_TLB_INFO(slave).head = TLB_NULL_INDEX; tlb_init_slave()
122 static void __tlb_clear_slave(struct bonding *bond, struct slave *slave, __tlb_clear_slave() argument
128 /* clear slave from tx_hashtbl */ __tlb_clear_slave()
133 index = SLAVE_TLB_INFO(slave).head; __tlb_clear_slave()
141 tlb_init_slave(slave); __tlb_clear_slave()
144 static void tlb_clear_slave(struct bonding *bond, struct slave *slave, tlb_clear_slave() argument
148 __tlb_clear_slave(bond, slave, save_load); tlb_clear_slave()
189 static long long compute_gap(struct slave *slave) compute_gap() argument
191 return (s64) (slave->speed << 20) - /* Convert to Megabit per sec */ compute_gap()
192 (s64) (SLAVE_TLB_INFO(slave).load << 3); /* Bytes to bits */ compute_gap()
195 static struct slave *tlb_get_least_loaded_slave(struct bonding *bond) tlb_get_least_loaded_slave()
197 struct slave *slave, *least_loaded; tlb_get_least_loaded_slave() local
204 /* Find the slave with the largest gap */ bond_for_each_slave_rcu()
205 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
206 if (bond_slave_can_tx(slave)) { bond_for_each_slave_rcu()
207 long long gap = compute_gap(slave); bond_for_each_slave_rcu()
210 least_loaded = slave; bond_for_each_slave_rcu()
219 static struct slave *__tlb_choose_channel(struct bonding *bond, u32 hash_index, __tlb_choose_channel()
224 struct slave *assigned_slave; __tlb_choose_channel()
255 static struct slave *tlb_choose_channel(struct bonding *bond, u32 hash_index, tlb_choose_channel()
258 struct slave *tx_slave; tlb_choose_channel()
301 struct slave *slave) rlb_arp_recv()
334 static struct slave *__rlb_next_rx_slave(struct bonding *bond) __rlb_next_rx_slave()
337 struct slave *before = NULL, *rx_slave = NULL, *slave; __rlb_next_rx_slave() local
341 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
342 if (!bond_slave_can_tx(slave)) bond_for_each_slave_rcu()
345 if (!before || before->speed < slave->speed) bond_for_each_slave_rcu()
346 before = slave; bond_for_each_slave_rcu()
348 if (!rx_slave || rx_slave->speed < slave->speed) bond_for_each_slave_rcu()
349 rx_slave = slave; bond_for_each_slave_rcu()
351 if (slave == bond_info->rx_slave) bond_for_each_slave_rcu()
355 * better before and up to the current slave
367 static struct slave *rlb_next_rx_slave(struct bonding *bond) rlb_next_rx_slave()
369 struct slave *rx_slave; rlb_next_rx_slave()
380 /* teach the switch the mac of a disabled slave
387 struct slave *curr_active = rtnl_dereference(bond->curr_active_slave); rlb_teach_disabled_mac_on_primary()
404 /* slave being removed should not be active at this point
408 static void rlb_clear_slave(struct bonding *bond, struct slave *slave) rlb_clear_slave() argument
414 /* clear slave from rx_hashtbl */ rlb_clear_slave()
421 if (rx_hash_table[index].slave == slave) { rlb_clear_slave()
422 struct slave *assigned_slave = rlb_next_rx_slave(bond); rlb_clear_slave()
425 rx_hash_table[index].slave = assigned_slave; rlb_clear_slave()
430 /* A slave has been removed from the rlb_clear_slave()
440 } else { /* there is no active slave */ rlb_clear_slave()
441 rx_hash_table[index].slave = NULL; rlb_clear_slave()
448 if (slave != rtnl_dereference(bond->curr_active_slave)) rlb_clear_slave()
449 rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr); rlb_clear_slave()
456 if (!client_info->slave) rlb_update_client()
464 client_info->slave->dev, rlb_update_client()
467 client_info->slave->dev->dev_addr, rlb_update_client()
470 netdev_err(client_info->slave->bond->dev, rlb_update_client()
475 skb->dev = client_info->slave->dev; rlb_update_client()
514 /* The slave was assigned a new mac address - update the clients */ rlb_req_update_slave_clients()
515 static void rlb_req_update_slave_clients(struct bonding *bond, struct slave *slave) rlb_req_update_slave_clients() argument
529 if ((client_info->slave == slave) && rlb_req_update_slave_clients()
560 if (!client_info->slave) { rlb_req_update_subnet_clients()
569 !ether_addr_equal_64bits(client_info->slave->dev->dev_addr, rlb_req_update_subnet_clients()
580 static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bond) rlb_choose_channel()
584 struct slave *assigned_slave, *curr_active_slave; rlb_choose_channel()
605 assigned_slave = client_info->slave; rlb_choose_channel()
616 client_info->slave != curr_active_slave) { rlb_choose_channel()
617 client_info->slave = curr_active_slave; rlb_choose_channel()
622 /* assign a new slave */ rlb_choose_channel()
645 client_info->slave = assigned_slave; rlb_choose_channel()
678 static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond) rlb_arp_xmit()
681 struct slave *tx_slave = NULL; rlb_arp_xmit()
710 * the primary slave. We must register these clients to be rlb_arp_xmit()
723 struct slave *assigned_slave; rlb_rebalance()
736 if (assigned_slave && (client_info->slave != assigned_slave)) { rlb_rebalance()
737 client_info->slave = assigned_slave; rlb_rebalance()
755 entry->slave = NULL; rlb_init_table_entry_dst()
924 static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[], alb_send_lp_vid() argument
948 skb->dev = slave->dev; alb_send_lp_vid()
956 static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[], alb_send_learning_packets() argument
959 struct bonding *bond = bond_get_bond_by_slave(slave); alb_send_learning_packets()
965 alb_send_lp_vid(slave, mac_addr, 0, 0); alb_send_learning_packets()
976 alb_send_lp_vid(slave, mac_addr, alb_send_learning_packets()
980 alb_send_lp_vid(slave, upper->dev_addr, alb_send_learning_packets()
993 alb_send_lp_vid(slave, upper->dev_addr, alb_send_learning_packets()
1001 static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[]) alb_set_slave_mac_addr() argument
1003 struct net_device *dev = slave->dev; alb_set_slave_mac_addr()
1006 if (BOND_MODE(slave->bond) == BOND_MODE_TLB) { alb_set_slave_mac_addr()
1011 /* for rlb each slave must have a unique hw mac addresses so that alb_set_slave_mac_addr()
1012 * each slave will receive packets destined to a different mac alb_set_slave_mac_addr()
1017 netdev_err(slave->bond->dev, "dev_set_mac_address of dev %s failed! ALB mode requires that the base driver support setting the hw address also when the network device's interface is open\n", alb_set_slave_mac_addr()
1028 static void alb_swap_mac_addr(struct slave *slave1, struct slave *slave2) alb_swap_mac_addr()
1042 static void alb_fasten_mac_swap(struct bonding *bond, struct slave *slave1, alb_fasten_mac_swap()
1043 struct slave *slave2) alb_fasten_mac_swap()
1046 struct slave *disabled_slave = NULL; alb_fasten_mac_swap()
1076 /* A disabled slave was assigned an active mac addr */ alb_fasten_mac_swap()
1085 * @slave: the slave that was just detached
1087 * We assume that @slave was already detached from the slave list.
1089 * If @slave's permanent hw address is different both from its current
1091 * a slave that has @slave's permanet address as its current address.
1092 * We'll make sure that that slave no longer uses @slave's permanent address.
1096 static void alb_change_hw_addr_on_detach(struct bonding *bond, struct slave *slave) alb_change_hw_addr_on_detach() argument
1100 struct slave *found_slave; alb_change_hw_addr_on_detach()
1102 perm_curr_diff = !ether_addr_equal_64bits(slave->perm_hwaddr, alb_change_hw_addr_on_detach()
1103 slave->dev->dev_addr); alb_change_hw_addr_on_detach()
1104 perm_bond_diff = !ether_addr_equal_64bits(slave->perm_hwaddr, alb_change_hw_addr_on_detach()
1108 found_slave = bond_slave_has_mac(bond, slave->perm_hwaddr); alb_change_hw_addr_on_detach()
1111 alb_swap_mac_addr(slave, found_slave); alb_change_hw_addr_on_detach()
1112 alb_fasten_mac_swap(bond, slave, found_slave); alb_change_hw_addr_on_detach()
1120 * @slave: the slave that was just attached
1122 * checks uniqueness of slave's mac address and handles the case the
1123 * new slave uses the bonds mac address.
1125 * If the permanent hw address of @slave is @bond's hw address, we need to
1126 * find a different hw address to give @slave, that isn't in use by any other
1127 * slave in the bond. This address must be, of course, one of the permanent
1130 * We go over the slave list, and for each slave there we compare its
1132 * If no match was found, then we've found a slave with a permanent address
1133 * that isn't used by any other slave in the bond, so we can assign it to
1134 * @slave.
1136 * assumption: this function is called before @slave is attached to the
1137 * bond slave list.
1139 static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slave *slave) alb_handle_addr_collision_on_attach() argument
1141 struct slave *has_bond_addr = rcu_access_pointer(bond->curr_active_slave); alb_handle_addr_collision_on_attach()
1142 struct slave *tmp_slave1, *free_mac_slave = NULL; alb_handle_addr_collision_on_attach()
1146 /* this is the first slave */ alb_handle_addr_collision_on_attach()
1150 /* if slave's mac address differs from bond's mac address alb_handle_addr_collision_on_attach()
1151 * check uniqueness of slave's mac address against the other alb_handle_addr_collision_on_attach()
1154 if (!ether_addr_equal_64bits(slave->perm_hwaddr, bond->dev->dev_addr)) { alb_handle_addr_collision_on_attach()
1155 if (!bond_slave_has_mac(bond, slave->dev->dev_addr)) alb_handle_addr_collision_on_attach()
1158 /* Try setting slave mac to bond address and fall-through alb_handle_addr_collision_on_attach()
1161 alb_set_slave_mac_addr(slave, bond->dev->dev_addr); alb_handle_addr_collision_on_attach()
1164 /* The slave's address is equal to the address of the bond. alb_handle_addr_collision_on_attach()
1165 * Search for a spare address in the bond for this slave. alb_handle_addr_collision_on_attach()
1169 /* no slave has tmp_slave1's perm addr bond_for_each_slave()
1186 alb_set_slave_mac_addr(slave, free_mac_slave->perm_hwaddr);
1188 netdev_warn(bond->dev, "the hw address of slave %s is in use by the bond; giving it the hw address of %s\n",
1189 slave->dev->name, free_mac_slave->dev->name);
1192 netdev_err(bond->dev, "the hw address of slave %s is in use by the bond; couldn't find a slave with a free hw address to give it (this should not have happened)\n",
1193 slave->dev->name);
1209 * For each slave, this function sets the interface to the new address and then
1216 struct slave *slave, *rollback_slave; alb_set_mac_address() local
1225 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1227 ether_addr_copy(tmp_addr, slave->dev->dev_addr); bond_for_each_slave()
1229 res = dev_set_mac_address(slave->dev, addr); bond_for_each_slave()
1232 ether_addr_copy(slave->dev->dev_addr, tmp_addr); bond_for_each_slave()
1244 /* unwind from head to the slave that failed */ bond_for_each_slave()
1246 if (rollback_slave == slave) bond_for_each_slave()
1291 struct slave *tx_slave) bond_do_alb_xmit()
1329 struct slave *tx_slave = NULL; bond_tlb_xmit()
1368 struct slave *tx_slave = NULL; bond_alb_xmit()
1466 struct slave *slave; bond_alb_monitor() local
1483 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
1486 * use mac of the slave device. bond_for_each_slave_rcu()
1489 strict_match = (slave != rcu_access_pointer(bond->curr_active_slave) || bond_for_each_slave_rcu()
1491 alb_send_learning_packets(slave, slave->dev->dev_addr, bond_for_each_slave_rcu()
1499 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
1500 tlb_clear_slave(bond, slave, 1); bond_for_each_slave_rcu()
1501 if (slave == rcu_access_pointer(bond->curr_active_slave)) { bond_for_each_slave_rcu()
1502 SLAVE_TLB_INFO(slave).load = bond_for_each_slave_rcu()
1525 * because a slave was disabled then
1559 /* assumption: called before the slave is attached to the bond
1562 int bond_alb_init_slave(struct bonding *bond, struct slave *slave) bond_alb_init_slave() argument
1566 res = alb_set_slave_mac_addr(slave, slave->perm_hwaddr); bond_alb_init_slave()
1570 res = alb_handle_addr_collision_on_attach(bond, slave); bond_alb_init_slave()
1574 tlb_init_slave(slave); bond_alb_init_slave()
1585 /* Remove slave from tlb and rlb hash tables, and fix up MAC addresses
1590 void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave) bond_alb_deinit_slave() argument
1593 alb_change_hw_addr_on_detach(bond, slave); bond_alb_deinit_slave()
1595 tlb_clear_slave(bond, slave, 0); bond_alb_deinit_slave()
1599 rlb_clear_slave(bond, slave); bond_alb_deinit_slave()
1604 void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char link) bond_alb_handle_link_change() argument
1609 tlb_clear_slave(bond, slave, 0); bond_alb_handle_link_change()
1611 rlb_clear_slave(bond, slave); bond_alb_handle_link_change()
1627 pr_err("Failed to build slave-array for TLB mode.\n"); bond_alb_handle_link_change()
1634 * @new_slave: new slave to assign
1641 void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave) bond_alb_handle_active_change()
1643 struct slave *swap_slave; bond_alb_handle_active_change()
1644 struct slave *curr_active; bond_alb_handle_active_change()
1676 /* in TLB mode, the slave might flip down/up with the old dev_addr, bond_alb_handle_active_change()
1711 struct slave *curr_active; bond_alb_set_mac_address()
1712 struct slave *swap_slave; bond_alb_set_mac_address()
300 rlb_arp_recv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave) rlb_arp_recv() argument
H A Dbond_main.c20 * the first slave bonded to the channel. All slaves will then use
27 * will attach eth0 to bond0 as a slave. eth0 hw mac address will either
144 MODULE_PARM_DESC(primary_reselect, "Reselect primary slave "
149 "2 for only on active slave "
188 MODULE_PARM_DESC(packets_per_slave, "Packets to send per slave in balance-rr "
189 "mode; 0 for a random slave, 1 packet per "
190 "slave (default), >1 packets per slave.");
247 * @slave_dev: slave that is supposed to xmit this skbuff
265 * We don't protect the slave list iteration with a lock because:
289 struct slave *slave, *rollback_slave; bond_vlan_rx_add_vid() local
293 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
294 res = vlan_vid_add(slave->dev, proto, vid); bond_for_each_slave()
302 /* unwind to the slave that failed */ bond_for_each_slave()
304 if (rollback_slave == slave) bond_for_each_slave()
323 struct slave *slave; bond_vlan_rx_kill_vid() local
325 bond_for_each_slave(bond, slave, iter) bond_vlan_rx_kill_vid()
326 vlan_vid_del(slave->dev, proto, vid); bond_vlan_rx_kill_vid()
345 struct slave *slave; bond_set_carrier() local
353 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
354 if (slave->link == BOND_LINK_UP) { bond_for_each_slave()
371 /* Get link speed and duplex from the slave's base driver
376 static void bond_update_speed_duplex(struct slave *slave) bond_update_speed_duplex() argument
378 struct net_device *slave_dev = slave->dev; bond_update_speed_duplex()
383 slave->speed = SPEED_UNKNOWN; bond_update_speed_duplex()
384 slave->duplex = DUPLEX_UNKNOWN; bond_update_speed_duplex()
402 slave->speed = slave_speed; bond_update_speed_duplex()
403 slave->duplex = ecmd.duplex; bond_update_speed_duplex()
500 struct slave *curr_active = rtnl_dereference(bond->curr_active_slave); bond_set_promiscuity()
505 struct slave *slave; bond_set_promiscuity() local
507 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
508 err = dev_set_promiscuity(slave->dev, inc); bond_for_each_slave()
523 struct slave *curr_active = rtnl_dereference(bond->curr_active_slave); bond_set_allmulti()
528 struct slave *slave; bond_set_allmulti() local
530 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
531 err = dev_set_allmulti(slave->dev, inc); bond_for_each_slave()
541 * slave.
561 /* Flush bond's hardware addresses from slave */ bond_hw_addr_flush()
578 /*--------------------------- Active slave change ---------------------------*/
585 static void bond_hw_addr_swap(struct bonding *bond, struct slave *new_active, bond_hw_addr_swap()
586 struct slave *old_active) bond_hw_addr_swap()
614 * bond_set_dev_addr - clone slave's address to bond
616 * @slave_dev: slave net device
630 static struct slave *bond_get_old_active(struct bonding *bond, bond_get_old_active()
631 struct slave *new_active) bond_get_old_active()
633 struct slave *slave; bond_get_old_active() local
636 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
637 if (slave == new_active) bond_for_each_slave()
640 if (ether_addr_equal(bond->dev->dev_addr, slave->dev->dev_addr)) bond_for_each_slave()
641 return slave; bond_for_each_slave()
654 struct slave *new_active, bond_do_fail_over_mac()
655 struct slave *old_active) bond_do_fail_over_mac()
668 * if just old_active, do nothing (going to no active slave) bond_do_fail_over_mac()
689 netdev_err(bond->dev, "Error %d setting MAC of slave %s\n", bond_do_fail_over_mac()
702 netdev_err(bond->dev, "Error %d setting MAC of slave %s\n", bond_do_fail_over_mac()
716 struct slave *prim = rtnl_dereference(bond->primary_slave); bond_should_change_active()
717 struct slave *curr = rtnl_dereference(bond->curr_active_slave); bond_should_change_active()
735 * find_best_interface - select the best available slave to be the active one
738 static struct slave *bond_find_best_slave(struct bonding *bond) bond_find_best_slave()
740 struct slave *slave, *bestslave = NULL, *primary; bond_find_best_slave() local
749 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
750 if (slave->link == BOND_LINK_UP) bond_for_each_slave()
751 return slave; bond_for_each_slave()
752 if (slave->link == BOND_LINK_BACK && bond_slave_is_up(slave) && bond_for_each_slave()
753 slave->delay < mintime) { bond_for_each_slave()
754 mintime = slave->delay; bond_for_each_slave()
755 bestslave = slave; bond_for_each_slave()
764 struct slave *slave; bond_should_notify_peers() local
767 slave = rcu_dereference(bond->curr_active_slave); bond_should_notify_peers()
770 netdev_dbg(bond->dev, "bond_should_notify_peers: slave %s\n", bond_should_notify_peers()
771 slave ? slave->dev->name : "NULL"); bond_should_notify_peers()
773 if (!slave || !bond->send_peer_notif || bond_should_notify_peers()
774 test_bit(__LINK_STATE_LINKWATCH_PENDING, &slave->dev->state)) bond_should_notify_peers()
781 * change_active_interface - change the active slave into the specified one
783 * @new: the new slave to make the active one
785 * Set the new slave to the bond's settings and unset them on the old
790 * because it is apparently the best available slave we have, even though its
795 void bond_change_active_slave(struct bonding *bond, struct slave *new_active) bond_change_active_slave()
797 struct slave *old_active; bond_change_active_slave()
876 /* resend IGMP joins since active slave has changed or bond_change_active_slave()
890 * bond_select_active_slave - select a new active slave, if needed
896 * - A slave has got its link back and there's no old curr_active_slave.
902 struct slave *best_slave; bond_select_active_slave()
923 static inline int slave_enable_netpoll(struct slave *slave) slave_enable_netpoll() argument
933 err = __netpoll_setup(np, slave->dev); slave_enable_netpoll()
938 slave->np = np; slave_enable_netpoll()
942 static inline void slave_disable_netpoll(struct slave *slave) slave_disable_netpoll() argument
944 struct netpoll *np = slave->np; slave_disable_netpoll()
949 slave->np = NULL; slave_disable_netpoll()
956 struct slave *slave = NULL; bond_poll_controller() local
967 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
968 ops = slave->dev->netdev_ops; bond_for_each_slave_rcu()
969 if (!bond_slave_is_up(slave) || !ops->ndo_poll_controller) bond_for_each_slave_rcu()
974 SLAVE_AD_INFO(slave)->port.aggregator; bond_for_each_slave_rcu()
981 ni = rcu_dereference_bh(slave->dev->npinfo); bond_for_each_slave_rcu()
984 ops->ndo_poll_controller(slave->dev); bond_for_each_slave_rcu()
994 struct slave *slave; bond_netpoll_cleanup() local
996 bond_for_each_slave(bond, slave, iter) bond_netpoll_cleanup()
997 if (bond_slave_is_up(slave)) bond_netpoll_cleanup()
998 slave_disable_netpoll(slave); bond_netpoll_cleanup()
1005 struct slave *slave; bond_netpoll_setup() local
1008 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1009 err = slave_enable_netpoll(slave); bond_for_each_slave()
1018 static inline int slave_enable_netpoll(struct slave *slave) slave_enable_netpoll() argument
1022 static inline void slave_disable_netpoll(struct slave *slave) slave_disable_netpoll() argument
1038 struct slave *slave; bond_fix_features() local
1040 /* If any slave has the offload feature flag set, bond_fix_features()
1048 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1050 slave->dev->features, bond_for_each_slave()
1073 struct slave *slave; bond_compute_features() local
1082 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1084 slave->dev->vlan_features, BOND_VLAN_FEATURES); bond_for_each_slave()
1087 slave->dev->hw_enc_features, bond_for_each_slave()
1089 dst_release_flag &= slave->dev->priv_flags; bond_for_each_slave()
1090 if (slave->dev->hard_header_len > max_hard_header_len) bond_for_each_slave()
1091 max_hard_header_len = slave->dev->hard_header_len; bond_for_each_slave()
1093 gso_max_size = min(gso_max_size, slave->dev->gso_max_size); bond_for_each_slave()
1094 gso_max_segs = min(gso_max_segs, slave->dev->gso_max_segs); bond_for_each_slave()
1125 /* On bonding slaves other than the currently active slave, suppress
1129 struct slave *slave, bond_should_deliver_exact_match()
1132 if (bond_is_slave_inactive(slave)) { bond_should_deliver_exact_match()
1145 struct slave *slave; bond_handle_frame() local
1148 struct slave *); bond_handle_frame()
1157 slave = bond_slave_get_rcu(skb->dev); bond_handle_frame()
1158 bond = slave->bond; bond_handle_frame()
1162 ret = recv_probe(skb, bond, slave); bond_handle_frame()
1169 if (bond_should_deliver_exact_match(skb, slave, bond)) { bond_handle_frame()
1192 struct slave *slave) bond_master_upper_dev_link()
1196 err = netdev_master_upper_dev_link_private(slave_dev, bond_dev, slave); bond_master_upper_dev_link()
1211 static struct slave *bond_alloc_slave(struct bonding *bond) bond_alloc_slave()
1213 struct slave *slave = NULL; bond_alloc_slave() local
1215 slave = kzalloc(sizeof(struct slave), GFP_KERNEL); bond_alloc_slave()
1216 if (!slave) bond_alloc_slave()
1220 SLAVE_AD_INFO(slave) = kzalloc(sizeof(struct ad_slave_info), bond_alloc_slave()
1222 if (!SLAVE_AD_INFO(slave)) { bond_alloc_slave()
1223 kfree(slave); bond_alloc_slave()
1227 return slave; bond_alloc_slave()
1230 static void bond_free_slave(struct slave *slave) bond_free_slave() argument
1232 struct bonding *bond = bond_get_bond_by_slave(slave); bond_free_slave()
1235 kfree(SLAVE_AD_INFO(slave)); bond_free_slave()
1237 kfree(slave); bond_free_slave()
1247 static void bond_fill_ifslave(struct slave *slave, struct ifslave *info) bond_fill_ifslave() argument
1249 strcpy(info->slave_name, slave->dev->name); bond_fill_ifslave()
1250 info->link = slave->link; bond_fill_ifslave()
1251 info->state = bond_slave_state(slave); bond_fill_ifslave()
1252 info->link_failure_count = slave->link_failure_count; bond_fill_ifslave()
1273 void bond_queue_slave_event(struct slave *slave) bond_queue_slave_event() argument
1275 struct bonding *bond = slave->bond; bond_queue_slave_event()
1281 dev_hold(slave->dev); bond_queue_slave_event()
1282 nnw->dev = slave->dev; bond_queue_slave_event()
1283 bond_fill_ifslave(slave, &nnw->bonding_info.slave); bond_queue_slave_event()
1287 queue_delayed_work(slave->bond->wq, &nnw->work, 0); bond_queue_slave_event()
1290 /* enslave device <slave> to bond device <master> */ bond_enslave()
1295 struct slave *new_slave = NULL, *prev_slave; bond_enslave()
1324 netdev_err(bond_dev, "Error: cannot enslave VLAN challenged slave %s on VLAN enabled bond %s\n", bond_enslave()
1328 netdev_warn(bond_dev, "enslaved VLAN challenged slave %s. Adding VLANs will be blocked as long as %s is part of bond %s\n", bond_enslave()
1338 * be identified with moderate accuracy by the state of the slave: bond_enslave()
1349 /* set bonding device ether type by slave - bonding netdevices are bond_enslave()
1350 * created with ether_setup, so when the slave type is not ARPHRD_ETHER bond_enslave()
1392 netdev_warn(bond_dev, "The slave device specified does not support setting the MAC address\n"); bond_enslave()
1399 netdev_err(bond_dev, "The slave device specified does not support setting the MAC address, but fail_over_mac is not set to active\n"); bond_enslave()
1408 /* If this is the first slave, then we need to set the master's hardware bond_enslave()
1409 * address to be the same as the slave's. bond_enslave()
1428 /* Save slave's original mtu and then set it to match the bond */ bond_enslave()
1436 /* Save slave's original ("permanent") mac address for modes bond_enslave()
1444 /* Set slave to master's mac address. The application already bond_enslave()
1445 * set the master's mac address to that of the first slave bond_enslave()
1456 /* set slave flag before open to prevent IPv6 addrconf */ bond_enslave()
1459 /* open the slave since the application closed it */ bond_enslave()
1462 netdev_dbg(bond_dev, "Opening slave %s failed\n", slave_dev->name); bond_enslave()
1467 /* initialize slave stats */ bond_enslave()
1483 /* set promiscuity level to new slave */ bond_enslave()
1490 /* set allmulti level to new slave */ bond_enslave()
1581 /* if there is a primary slave, remember it */ bond_enslave()
1599 /* if this is the first slave */ bond_enslave()
1619 netdev_dbg(bond_dev, "This slave is always active in trunk mode\n"); bond_enslave()
1639 netdev_info(bond_dev, "master_dev is using netpoll, but new slave device does not support netpoll\n"); bond_enslave()
1723 * MAC if this slave's MAC is in use by the bond, or at bond_enslave()
1738 /* Enslave of first slave has failed and we need to fix master's mac */ bond_enslave()
1746 /* Try to release the slave device <slave> from the bond device <master>
1751 * The rules for slave state should be:
1762 struct slave *slave, *oldcurrent; __bond_release_one() local
1767 /* slave is not a slave or master is not master of this slave */ __bond_release_one()
1777 slave = bond_get_slave_by_dev(bond, slave_dev); __bond_release_one()
1778 if (!slave) { __bond_release_one()
1779 /* not a slave of this bond */ __bond_release_one()
1786 bond_sysfs_slave_del(slave); __bond_release_one()
1788 /* recompute stats just before removing the slave */ __bond_release_one()
1793 * for this slave anymore. __bond_release_one()
1798 bond_3ad_unbind_slave(slave); __bond_release_one()
1801 bond_update_slave_arr(bond, slave); __bond_release_one()
1804 bond_is_active_slave(slave) ? "active" : "backup", __bond_release_one()
1813 if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) && __bond_release_one()
1816 slave_dev->name, slave->perm_hwaddr, __bond_release_one()
1820 if (rtnl_dereference(bond->primary_slave) == slave) __bond_release_one()
1823 if (oldcurrent == slave) __bond_release_one()
1827 /* Must be called only after the slave has been __bond_release_one()
1830 * but before a new active slave is selected. __bond_release_one()
1832 bond_alb_deinit_slave(bond, slave); __bond_release_one()
1837 } else if (oldcurrent == slave) { __bond_release_one()
1839 * is no concern that another slave add/remove event __bond_release_one()
1862 netdev_info(bond_dev, "last VLAN challenged slave %s left bond %s - VLAN blocking is removed\n", __bond_release_one()
1871 /* unset promiscuity level from slave __bond_release_one()
1875 * when this slave was attached, so we cache at the start of the __bond_release_one()
1881 /* unset allmulti level from slave */ __bond_release_one()
1888 slave_disable_netpoll(slave); __bond_release_one()
1890 /* close slave before restoring its mac address */ __bond_release_one()
1896 ether_addr_copy(addr.sa_data, slave->perm_hwaddr); __bond_release_one()
1901 dev_set_mtu(slave_dev, slave->original_mtu); __bond_release_one()
1905 bond_free_slave(slave); __bond_release_one()
1916 /* First release a slave and then destroy the bond if no more slaves are left.
1948 struct slave *slave; bond_slave_info_query() local
1950 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1953 bond_fill_ifslave(slave, info); bond_for_each_slave()
1968 struct slave *slave; bond_miimon_inspect() local
1973 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
1974 slave->new_link = BOND_LINK_NOCHANGE; bond_for_each_slave_rcu()
1976 link_state = bond_check_dev_link(bond, slave->dev, 0); bond_for_each_slave_rcu()
1978 switch (slave->link) { bond_for_each_slave_rcu()
1983 bond_set_slave_link_state(slave, BOND_LINK_FAIL); bond_for_each_slave_rcu()
1984 slave->delay = bond->params.downdelay; bond_for_each_slave_rcu()
1985 if (slave->delay) { bond_for_each_slave_rcu()
1989 (bond_is_active_slave(slave) ? bond_for_each_slave_rcu()
1991 slave->dev->name, bond_for_each_slave_rcu()
1998 bond_set_slave_link_state(slave, BOND_LINK_UP); bond_for_each_slave_rcu()
1999 slave->last_link_up = jiffies; bond_for_each_slave_rcu()
2001 (bond->params.downdelay - slave->delay) * bond_for_each_slave_rcu()
2003 slave->dev->name); bond_for_each_slave_rcu()
2007 if (slave->delay <= 0) { bond_for_each_slave_rcu()
2008 slave->new_link = BOND_LINK_DOWN; bond_for_each_slave_rcu()
2013 slave->delay--; bond_for_each_slave_rcu()
2020 bond_set_slave_link_state(slave, BOND_LINK_BACK); bond_for_each_slave_rcu()
2021 slave->delay = bond->params.updelay; bond_for_each_slave_rcu()
2023 if (slave->delay) { bond_for_each_slave_rcu()
2025 slave->dev->name, bond_for_each_slave_rcu()
2033 bond_set_slave_link_state(slave, bond_for_each_slave_rcu()
2036 (bond->params.updelay - slave->delay) * bond_for_each_slave_rcu()
2038 slave->dev->name); bond_for_each_slave_rcu()
2044 slave->delay = 0; bond_for_each_slave_rcu()
2046 if (slave->delay <= 0) { bond_for_each_slave_rcu()
2047 slave->new_link = BOND_LINK_UP; bond_for_each_slave_rcu()
2053 slave->delay--; bond_for_each_slave_rcu()
2064 struct slave *slave, *primary; bond_miimon_commit() local
2066 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
2067 switch (slave->new_link) { bond_for_each_slave()
2072 bond_set_slave_link_state(slave, BOND_LINK_UP); bond_for_each_slave()
2073 slave->last_link_up = jiffies; bond_for_each_slave()
2078 bond_set_backup_slave(slave); bond_for_each_slave()
2081 bond_set_active_slave(slave); bond_for_each_slave()
2082 } else if (slave != primary) { bond_for_each_slave()
2084 bond_set_backup_slave(slave); bond_for_each_slave()
2088 slave->dev->name, bond_for_each_slave()
2089 slave->speed == SPEED_UNKNOWN ? 0 : slave->speed, bond_for_each_slave()
2090 slave->duplex ? "full" : "half"); bond_for_each_slave()
2094 bond_3ad_handle_link_change(slave, BOND_LINK_UP); bond_for_each_slave()
2097 bond_alb_handle_link_change(bond, slave, bond_for_each_slave()
2103 if (!bond->curr_active_slave || slave == primary) bond_for_each_slave()
2109 if (slave->link_failure_count < UINT_MAX) bond_for_each_slave()
2110 slave->link_failure_count++; bond_for_each_slave()
2112 bond_set_slave_link_state(slave, BOND_LINK_DOWN); bond_for_each_slave()
2116 bond_set_slave_inactive_flags(slave, bond_for_each_slave()
2120 slave->dev->name); bond_for_each_slave()
2123 bond_3ad_handle_link_change(slave, bond_for_each_slave()
2127 bond_alb_handle_link_change(bond, slave, bond_for_each_slave()
2133 if (slave == rcu_access_pointer(bond->curr_active_slave)) bond_for_each_slave()
2139 netdev_err(bond->dev, "invalid new link %d on slave %s\n", bond_for_each_slave()
2140 slave->new_link, slave->dev->name); bond_for_each_slave()
2141 slave->new_link = BOND_LINK_NOCHANGE; bond_for_each_slave()
2238 netdev_dbg(slave_dev, "arp %d on slave %s: dst %pI4 src %pI4\n", bond_arp_send()
2324 static void bond_arp_send_all(struct bonding *bond, struct slave *slave) bond_arp_send_all() argument
2346 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], bond_arp_send_all()
2372 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], bond_arp_send_all()
2378 static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32 sip, __be32 tip) bond_validate_arp() argument
2394 slave->last_rx = jiffies; bond_validate_arp()
2395 slave->target_last_arp_rx[i] = jiffies; bond_validate_arp()
2399 struct slave *slave) bond_arp_rcv()
2402 struct slave *curr_active_slave, *curr_arp_slave; bond_arp_rcv()
2407 if (!slave_do_arp_validate(bond, slave)) { bond_arp_rcv()
2410 slave->last_rx = jiffies; bond_arp_rcv()
2444 slave->dev->name, bond_slave_state(slave), bond_arp_rcv()
2445 bond->params.arp_validate, slave_do_arp_validate(bond, slave), bond_arp_rcv()
2453 * (a) the slave receiving the ARP is active (which includes the bond_arp_rcv()
2454 * current ARP slave, if any), or bond_arp_rcv()
2456 * (b) the receiving slave isn't active, but there is a currently bond_arp_rcv()
2457 * active slave and it received valid arp reply(s) after it became bond_arp_rcv()
2458 * the currently active slave, or bond_arp_rcv()
2460 * (c) there is an ARP slave that sent an ARP during the prior ARP bond_arp_rcv()
2461 * interval, and we receive an ARP reply on any slave. We accept bond_arp_rcv()
2463 * reply to a slave other than the sender of the ARP request. bond_arp_rcv()
2467 * slave through the L2 switch(es) to the receiving slave. Since bond_arp_rcv()
2474 if (bond_is_active_slave(slave)) bond_arp_rcv()
2475 bond_validate_arp(bond, slave, sip, tip); bond_arp_rcv()
2479 bond_validate_arp(bond, slave, tip, sip); bond_arp_rcv()
2483 bond_validate_arp(bond, slave, sip, tip); bond_arp_rcv()
2505 /* This function is called regularly to monitor each slave's link
2515 struct slave *slave, *oldcurrent; bond_loadbalance_arp_mon() local
2527 * the picture unless it is null. also, slave->last_link_up is not bond_loadbalance_arp_mon()
2528 * needed here because we send an arp on each slave and give a slave bond_loadbalance_arp_mon()
2533 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
2534 unsigned long trans_start = dev_trans_start(slave->dev); bond_for_each_slave_rcu()
2536 if (slave->link != BOND_LINK_UP) { bond_for_each_slave_rcu()
2538 bond_time_in_interval(bond, slave->last_rx, 1)) { bond_for_each_slave_rcu()
2540 slave->link = BOND_LINK_UP; bond_for_each_slave_rcu()
2544 * mode. the window of a slave being up and bond_for_each_slave_rcu()
2550 slave->dev->name); bond_for_each_slave_rcu()
2554 slave->dev->name); bond_for_each_slave_rcu()
2558 /* slave->link == BOND_LINK_UP */ bond_for_each_slave_rcu()
2565 !bond_time_in_interval(bond, slave->last_rx, 2)) { bond_for_each_slave_rcu()
2567 slave->link = BOND_LINK_DOWN; bond_for_each_slave_rcu()
2570 if (slave->link_failure_count < UINT_MAX) bond_for_each_slave_rcu()
2571 slave->link_failure_count++; bond_for_each_slave_rcu()
2574 slave->dev->name); bond_for_each_slave_rcu()
2576 if (slave == oldcurrent) bond_for_each_slave_rcu()
2588 if (bond_slave_is_up(slave)) bond_for_each_slave_rcu()
2589 bond_arp_send_all(bond, slave); bond_for_each_slave_rcu()
2619 * place for the slave. Returns 0 if no changes are found, >0 if changes
2628 struct slave *slave; bond_ab_arp_inspect() local
2631 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
2632 slave->new_link = BOND_LINK_NOCHANGE; bond_for_each_slave_rcu()
2633 last_rx = slave_last_rx(bond, slave); bond_for_each_slave_rcu()
2635 if (slave->link != BOND_LINK_UP) { bond_for_each_slave_rcu()
2637 slave->new_link = BOND_LINK_UP; bond_for_each_slave_rcu()
2647 if (bond_time_in_interval(bond, slave->last_link_up, 2)) bond_for_each_slave_rcu()
2650 /* Backup slave is down if: bond_for_each_slave_rcu()
2659 * gives each slave a chance to tx/rx traffic bond_for_each_slave_rcu()
2662 if (!bond_is_active_slave(slave) && bond_for_each_slave_rcu()
2665 slave->new_link = BOND_LINK_DOWN; bond_for_each_slave_rcu()
2669 /* Active slave is down if: bond_for_each_slave_rcu()
2674 trans_start = dev_trans_start(slave->dev); bond_for_each_slave_rcu()
2675 if (bond_is_active_slave(slave) && bond_for_each_slave_rcu()
2678 slave->new_link = BOND_LINK_DOWN; bond_for_each_slave_rcu()
2695 struct slave *slave; bond_ab_arp_commit() local
2697 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
2698 switch (slave->new_link) { bond_for_each_slave()
2703 trans_start = dev_trans_start(slave->dev); bond_for_each_slave()
2704 if (rtnl_dereference(bond->curr_active_slave) != slave || bond_for_each_slave()
2707 struct slave *current_arp_slave; bond_for_each_slave()
2710 bond_set_slave_link_state(slave, BOND_LINK_UP); bond_for_each_slave()
2719 slave->dev->name); bond_for_each_slave()
2722 slave == rtnl_dereference(bond->primary_slave)) bond_for_each_slave()
2730 if (slave->link_failure_count < UINT_MAX) bond_for_each_slave()
2731 slave->link_failure_count++; bond_for_each_slave()
2733 bond_set_slave_link_state(slave, BOND_LINK_DOWN); bond_for_each_slave()
2734 bond_set_slave_inactive_flags(slave, bond_for_each_slave()
2738 slave->dev->name); bond_for_each_slave()
2740 if (slave == rtnl_dereference(bond->curr_active_slave)) { bond_for_each_slave()
2748 netdev_err(bond->dev, "impossible: new_link %d on slave %s\n", bond_for_each_slave()
2749 slave->new_link, slave->dev->name); bond_for_each_slave()
2768 struct slave *slave, *before = NULL, *new_slave = NULL, bond_ab_arp_probe() local
2786 * backup slave from the current_arp_slave and make it the candidate bond_ab_arp_probe()
2798 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
2799 if (!found && !before && bond_slave_is_up(slave)) bond_for_each_slave_rcu()
2800 before = slave; bond_for_each_slave_rcu()
2802 if (found && !new_slave && bond_slave_is_up(slave)) bond_for_each_slave_rcu()
2803 new_slave = slave; bond_for_each_slave_rcu()
2808 * one the current slave so it is still marked bond_for_each_slave_rcu()
2811 if (!bond_slave_is_up(slave) && slave->link == BOND_LINK_UP) { bond_for_each_slave_rcu()
2812 bond_set_slave_link_state(slave, BOND_LINK_DOWN); bond_for_each_slave_rcu()
2813 if (slave->link_failure_count < UINT_MAX) bond_for_each_slave_rcu()
2814 slave->link_failure_count++; bond_for_each_slave_rcu()
2816 bond_set_slave_inactive_flags(slave, bond_for_each_slave_rcu()
2820 slave->dev->name); bond_for_each_slave_rcu()
2822 if (slave == curr_arp_slave) bond_for_each_slave_rcu()
2839 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
2840 if (slave->should_notify) { bond_for_each_slave_rcu()
2943 struct slave *slave = bond_slave_get_rtnl(slave_dev), *primary; bond_slave_netdev_event() local
2951 * slave will be NULL bond_slave_netdev_event()
2953 if (!slave) bond_slave_netdev_event()
2955 bond_dev = slave->bond->dev; bond_slave_netdev_event()
2956 bond = slave->bond; bond_slave_netdev_event()
2968 old_speed = slave->speed; bond_slave_netdev_event()
2969 old_duplex = slave->duplex; bond_slave_netdev_event()
2971 bond_update_speed_duplex(slave); bond_slave_netdev_event()
2974 if (old_speed != slave->speed) bond_slave_netdev_event()
2975 bond_3ad_adapter_speed_changed(slave); bond_slave_netdev_event()
2976 if (old_duplex != slave->duplex) bond_slave_netdev_event()
2977 bond_3ad_adapter_duplex_changed(slave); bond_slave_netdev_event()
2981 /* Refresh slave-array if applicable! bond_slave_netdev_event()
2983 * then these events will not cause the slave-array to be bond_slave_netdev_event()
2984 * refreshed. This will cause xmit to use a slave that is not bond_slave_netdev_event()
3000 * take over the slave's change_mtu bond_slave_netdev_event()
3011 if (slave == primary) { bond_slave_netdev_event()
3012 /* slave's name changed - he's no longer primary */ bond_slave_netdev_event()
3015 /* we have a new primary slave */ bond_slave_netdev_event()
3016 rcu_assign_pointer(bond->primary_slave, slave); bond_slave_netdev_event()
3021 netdev_info(bond->dev, "Primary slave changed to %s, reselecting active slave\n", bond_slave_netdev_event()
3033 call_netdevice_notifiers(event, slave->bond->dev); bond_slave_netdev_event()
3046 * locks for us to safely manipulate the slave devices (RTNL lock,
3187 struct slave *slave; bond_open() local
3189 /* reset slave->backup and slave->inactive */ bond_open()
3191 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
3193 slave != rcu_access_pointer(bond->curr_active_slave)) { bond_for_each_slave()
3194 bond_set_slave_inactive_flags(slave, bond_for_each_slave()
3197 bond_set_slave_active_flags(slave, bond_for_each_slave()
3255 struct slave *slave; bond_get_stats() local
3259 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
3261 dev_get_stats(slave->dev, &temp); bond_for_each_slave()
3262 struct rtnl_link_stats64 *pstats = &slave->slave_stats; bond_for_each_slave()
3290 /* save off the slave stats for the next run */ bond_for_each_slave()
3422 struct slave *slave; bond_set_rx_mode() local
3426 slave = rcu_dereference(bond->curr_active_slave); bond_set_rx_mode()
3427 if (slave) { bond_set_rx_mode()
3428 dev_uc_sync(slave->dev, bond_dev); bond_set_rx_mode()
3429 dev_mc_sync(slave->dev, bond_dev); bond_set_rx_mode()
3432 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
3433 dev_uc_sync_multiple(slave->dev, bond_dev); bond_for_each_slave_rcu()
3434 dev_mc_sync_multiple(slave->dev, bond_dev); bond_for_each_slave_rcu()
3445 struct slave *slave; bond_neigh_init() local
3448 slave = bond_first_slave(bond); bond_neigh_init()
3449 if (!slave) bond_neigh_init()
3451 slave_ops = slave->dev->netdev_ops; bond_neigh_init()
3457 ret = slave_ops->ndo_neigh_setup(slave->dev, &parms); bond_neigh_init()
3461 /* Assign slave's neigh_cleanup to neighbour in case cleanup is called bond_neigh_init()
3462 * after the last slave has been detached. Assumes that all slaves bond_neigh_init()
3475 * slave exists. So we must declare proxy setup function which will
3476 * be used at run time to resolve the actual slave neigh param setup.
3496 struct slave *slave, *rollback_slave; bond_change_mtu() local
3502 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
3504 slave, slave->dev->netdev_ops->ndo_change_mtu); bond_for_each_slave()
3506 res = dev_set_mtu(slave->dev, new_mtu); bond_for_each_slave()
3509 /* If we failed to set the slave's mtu to the new value bond_for_each_slave()
3512 * different mtu values than the active slave we'll bond_for_each_slave()
3518 slave->dev->name); bond_for_each_slave()
3528 /* unwind from head to the slave that failed */ bond_for_each_slave()
3532 if (rollback_slave == slave) bond_for_each_slave()
3554 struct slave *slave, *rollback_slave; bond_set_mac_address() local
3575 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
3576 netdev_dbg(bond_dev, "slave %p %s\n", slave, slave->dev->name); bond_for_each_slave()
3577 res = dev_set_mac_address(slave->dev, addr); bond_for_each_slave()
3579 /* TODO: consider downing the slave bond_for_each_slave()
3585 netdev_dbg(bond_dev, "err %d %s\n", res, slave->dev->name); bond_for_each_slave()
3598 /* unwind from head to the slave that failed */ bond_for_each_slave()
3602 if (rollback_slave == slave) bond_for_each_slave()
3616 * bond_xmit_slave_id - transmit skb through slave with slave_id
3619 * @slave_id: slave id up to slave_cnt-1 through which to transmit
3621 * This function tries to transmit through slave with slave_id but in case
3622 * it fails, it tries to find the first available slave for transmission.
3628 struct slave *slave; bond_xmit_slave_id() local
3631 /* Here we start from the slave with slave_id */ bond_for_each_slave_rcu()
3632 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
3634 if (bond_slave_can_tx(slave)) { bond_for_each_slave_rcu()
3635 bond_dev_queue_xmit(bond, skb, slave->dev); bond_for_each_slave_rcu()
3641 /* Here we start from the first slave up to slave_id */
3643 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
3646 if (bond_slave_can_tx(slave)) { bond_for_each_slave_rcu()
3647 bond_dev_queue_xmit(bond, skb, slave->dev); bond_for_each_slave_rcu()
3651 /* no slave that can tx has been found */
3656 * bond_rr_gen_slave_id - generate slave id based on packets_per_slave
3660 * this function generates a slave id, which is usually used as the next
3661 * slave to transmit through.
3692 struct slave *slave; bond_xmit_roundrobin() local
3702 slave = rcu_dereference(bond->curr_active_slave); bond_xmit_roundrobin()
3703 if (slave) bond_xmit_roundrobin()
3704 bond_dev_queue_xmit(bond, skb, slave->dev); bond_xmit_roundrobin()
3727 struct slave *slave; bond_xmit_activebackup() local
3729 slave = rcu_dereference(bond->curr_active_slave); bond_xmit_activebackup()
3730 if (slave) bond_xmit_activebackup()
3731 bond_dev_queue_xmit(bond, skb, slave->dev); bond_xmit_activebackup()
3760 pr_warn_ratelimited("Failed to update slave array from WT\n"); bond_slave_arr_handler()
3770 * to determine the slave interface -
3777 int bond_update_slave_arr(struct bonding *bond, struct slave *skipslave) bond_update_slave_arr()
3779 struct slave *slave; bond_update_slave_arr() local
3794 pr_err("Failed to build slave-array.\n"); bond_update_slave_arr()
3816 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
3820 agg = SLAVE_AD_INFO(slave)->port.aggregator; bond_for_each_slave()
3824 if (!bond_slave_can_tx(slave)) bond_for_each_slave()
3826 if (skipslave == slave) bond_for_each_slave()
3828 new_arr->arr[new_arr->count++] = slave; bond_for_each_slave()
3840 * slave but allocation failed (most likely!). BTW this is
3845 * this to-be-skipped slave to send a packet out.
3861 * usable slave array is formed in the control path. The xmit function
3867 struct slave *slave; bond_3ad_xor_xmit() local
3874 slave = slaves->arr[bond_xmit_hash(bond, skb) % count]; bond_3ad_xor_xmit()
3875 bond_dev_queue_xmit(bond, skb, slave->dev); bond_3ad_xor_xmit()
3887 struct slave *slave = NULL; bond_xmit_broadcast() local
3890 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
3891 if (bond_is_last_slave(bond, slave)) bond_for_each_slave_rcu()
3893 if (bond_slave_is_up(slave) && slave->link == BOND_LINK_UP) { bond_for_each_slave_rcu()
3901 bond_dev_queue_xmit(bond, skb2, slave->dev); bond_for_each_slave_rcu()
3904 if (slave && bond_slave_is_up(slave) && slave->link == BOND_LINK_UP)
3905 bond_dev_queue_xmit(bond, skb, slave->dev);
3914 /* Lookup the slave that corresponds to a qid */ bond_slave_override()
3918 struct slave *slave = NULL; bond_slave_override() local
3925 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
3926 if (slave->queue_id == skb->queue_mapping) { bond_for_each_slave_rcu()
3927 if (bond_slave_is_up(slave) && bond_for_each_slave_rcu()
3928 slave->link == BOND_LINK_UP) { bond_for_each_slave_rcu()
3929 bond_dev_queue_xmit(bond, skb, slave->dev); bond_for_each_slave_rcu()
3932 /* If the slave isn't UP, use default transmit policy. */ bond_for_each_slave_rcu()
4020 struct slave *slave; bond_ethtool_get_settings() local
4030 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
4031 if (bond_slave_can_tx(slave)) { bond_for_each_slave()
4032 if (slave->speed != SPEED_UNKNOWN) bond_for_each_slave()
4033 speed += slave->speed; bond_for_each_slave()
4035 slave->duplex != DUPLEX_UNKNOWN) bond_for_each_slave()
4036 ecmd->duplex = slave->duplex; bond_for_each_slave()
4155 struct slave *slave; bond_uninit() local
4161 bond_for_each_slave(bond, slave, iter) bond_uninit()
4162 __bond_release_one(bond_dev, slave->dev, true); bond_uninit()
1128 bond_should_deliver_exact_match(struct sk_buff *skb, struct slave *slave, struct bonding *bond) bond_should_deliver_exact_match() argument
1190 bond_master_upper_dev_link(struct net_device *bond_dev, struct net_device *slave_dev, struct slave *slave) bond_master_upper_dev_link() argument
2398 bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave) bond_arp_rcv() argument
H A Dbond_procfs.c14 struct slave *slave; __acquires() local
22 bond_for_each_slave_rcu(bond, slave, iter) __acquires()
24 return slave; __acquires()
33 struct slave *slave; bond_info_seq_next() local
40 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
42 return slave; bond_for_each_slave_rcu()
43 if (slave == v) bond_for_each_slave_rcu()
60 struct slave *curr, *primary; bond_info_show_master()
160 const struct slave *slave) bond_info_show_slave()
164 seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); bond_info_show_slave()
165 seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link)); bond_info_show_slave()
166 if (slave->speed == SPEED_UNKNOWN) bond_info_show_slave()
169 seq_printf(seq, "Speed: %d Mbps\n", slave->speed); bond_info_show_slave()
171 if (slave->duplex == DUPLEX_UNKNOWN) bond_info_show_slave()
174 seq_printf(seq, "Duplex: %s\n", slave->duplex ? "full" : "half"); bond_info_show_slave()
177 slave->link_failure_count); bond_info_show_slave()
179 seq_printf(seq, "Permanent HW addr: %pM\n", slave->perm_hwaddr); bond_info_show_slave()
180 seq_printf(seq, "Slave queue ID: %d\n", slave->queue_id); bond_info_show_slave()
183 const struct port *port = &SLAVE_AD_INFO(slave)->port; bond_info_show_slave()
159 bond_info_show_slave(struct seq_file *seq, const struct slave *slave) bond_info_show_slave() argument
H A Dbond_3ad.c142 if (port->slave == NULL) __get_bond_by_port()
145 return bond_get_bond_by_slave(port->slave); __get_bond_by_port()
152 * Return the aggregator of the first slave in @bond, or %NULL if it can't be
159 struct slave *first_slave; __get_first_agg()
187 * __disable_port - disable the port's slave
192 bond_set_slave_inactive_flags(port->slave, BOND_SLAVE_NOTIFY_LATER); __disable_port()
196 * __enable_port - enable the port's slave, if it's up
201 struct slave *slave = port->slave; __enable_port() local
203 if ((slave->link == BOND_LINK_UP) && bond_slave_is_up(slave)) __enable_port()
204 bond_set_slave_active_flags(slave, BOND_SLAVE_NOTIFY_LATER); __enable_port()
208 * __port_is_enabled - check if the port's slave is in active state
213 return bond_is_active_slave(port->slave); __port_is_enabled()
263 struct slave *slave = port->slave; __get_link_speed() local
271 if (slave->link != BOND_LINK_UP) __get_link_speed()
274 switch (slave->speed) { __get_link_speed()
314 netdev_dbg(slave->bond->dev, "Port %d Received link speed %d update from adapter\n", __get_link_speed()
329 struct slave *slave = port->slave; __get_duplex() local
335 if (slave->link != BOND_LINK_UP) { __get_duplex()
338 switch (slave->duplex) { __get_duplex()
341 netdev_dbg(slave->bond->dev, "Port %d Received status full duplex update from adapter\n", __get_duplex()
347 netdev_dbg(slave->bond->dev, "Port %d Received status NOT full duplex update from adapter\n", __get_duplex()
474 pr_debug("%s partner sync=1\n", port->slave->dev->name); __record_pdu()
477 pr_debug("%s partner sync=0\n", port->slave->dev->name); __record_pdu()
700 struct bonding *bond = aggregator->slave->bond; __get_active_agg()
702 struct slave *slave; __get_active_agg() local
704 bond_for_each_slave_rcu(bond, slave, iter) __get_active_agg()
705 if (SLAVE_AD_INFO(slave)->aggregator.is_active) __get_active_agg()
706 return &(SLAVE_AD_INFO(slave)->aggregator); __get_active_agg()
734 port->slave->dev->name, port->actor_oper_port_state); __update_lacpdu_from_port()
770 struct slave *slave = port->slave; ad_lacpdu_send() local
779 skb->dev = slave->dev; ad_lacpdu_send()
791 ether_addr_copy(lacpdu_header->hdr.h_source, slave->perm_hwaddr); ad_lacpdu_send()
811 struct slave *slave = port->slave; ad_marker_send() local
822 skb->dev = slave->dev; ad_marker_send()
833 ether_addr_copy(marker_header->hdr.h_source, slave->perm_hwaddr); ad_marker_send()
846 * @update_slave_arr: Does slave array need update?
954 port->slave->dev->name, ad_mux_machine()
1072 port->slave->dev->name, ad_rx_machine()
1123 netdev_err(port->slave->bond->dev, "An illegal loopback occurred on adapter (%s)\n" ad_rx_machine()
1125 port->slave->dev->name); ad_rx_machine()
1301 * @update_slave_arr: Does slave array need update?
1313 struct slave *slave; ad_port_selection_logic() local
1368 port->slave->bond->dev->name, ad_port_selection_logic()
1370 port->slave->dev->name, ad_port_selection_logic()
1375 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1376 aggregator = &(SLAVE_AD_INFO(slave)->aggregator); bond_for_each_slave()
1453 port->actor_port_number, port->slave->dev->name);
1533 curr->slave->bond->dev->name, ad_agg_selection_test()
1548 return netif_running(port->slave->dev) && agg_device_up()
1549 netif_carrier_ok(port->slave->dev); agg_device_up()
1555 * @update_slave_arr: Does slave array need update?
1582 struct bonding *bond = agg->slave->bond; ad_agg_selection_logic()
1584 struct slave *slave; ad_agg_selection_logic() local
1592 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
1593 agg = &(SLAVE_AD_INFO(slave)->aggregator); bond_for_each_slave_rcu()
1633 netdev_dbg(bond->dev, "best ports %p slave %p %s\n",
1634 best->lag_ports, best->slave,
1635 best->slave ? best->slave->dev->name : "NULL");
1637 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
1638 agg = &(SLAVE_AD_INFO(slave)->aggregator); bond_for_each_slave_rcu()
1650 best->slave ?
1651 best->slave->bond->dev->name : "NULL");
1729 aggregator->slave = NULL; ad_initialize_agg()
1802 * @update_slave_arr: Does slave array need update?
1822 * @update_slave_arr: Does slave array need update?
1926 * bond_3ad_bind_slave - initialize a slave's port
1927 * @slave: slave struct to work on
1932 void bond_3ad_bind_slave(struct slave *slave) bond_3ad_bind_slave() argument
1934 struct bonding *bond = bond_get_bond_by_slave(slave); bond_3ad_bind_slave()
1938 /* check that the slave has not been initialized yet. */ bond_3ad_bind_slave()
1939 if (SLAVE_AD_INFO(slave)->port.slave != slave) { bond_3ad_bind_slave()
1942 port = &(SLAVE_AD_INFO(slave)->port); bond_3ad_bind_slave()
1946 port->slave = slave; bond_3ad_bind_slave()
1947 port->actor_port_number = SLAVE_AD_INFO(slave)->id; bond_3ad_bind_slave()
1970 aggregator = &(SLAVE_AD_INFO(slave)->aggregator); bond_3ad_bind_slave()
1976 aggregator->slave = slave; bond_3ad_bind_slave()
1983 * bond_3ad_unbind_slave - deinitialize a slave's port
1984 * @slave: slave struct to work on
1990 void bond_3ad_unbind_slave(struct slave *slave) bond_3ad_unbind_slave() argument
1995 struct bonding *bond = slave->bond; bond_3ad_unbind_slave()
1996 struct slave *slave_iter; bond_3ad_unbind_slave()
2002 aggregator = &(SLAVE_AD_INFO(slave)->aggregator); bond_3ad_unbind_slave()
2003 port = &(SLAVE_AD_INFO(slave)->port); bond_3ad_unbind_slave()
2005 /* if slave is null, the whole port is not initialized */ bond_3ad_unbind_slave()
2006 if (!port->slave) { bond_3ad_unbind_slave()
2008 slave->dev->name); bond_3ad_unbind_slave()
2023 * except the port related to this slave(thats ensure us that bond_3ad_unbind_slave()
2137 port->slave = NULL;
2162 struct slave *slave; bond_3ad_state_machine_handler() local
2181 slave = bond_first_slave_rcu(bond); bond_3ad_state_machine_handler()
2182 port = slave ? &(SLAVE_AD_INFO(slave)->port) : NULL; bond_3ad_state_machine_handler()
2186 if (!port->slave) { bond_3ad_state_machine_handler()
2199 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
2200 port = &(SLAVE_AD_INFO(slave)->port); bond_for_each_slave_rcu()
2201 if (!port->slave) { bond_for_each_slave_rcu()
2220 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
2221 if (slave->should_notify) { bond_for_each_slave_rcu()
2242 * @slave: slave struct to work on
2249 static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, bond_3ad_rx_indication() argument
2257 port = &(SLAVE_AD_INFO(slave)->port); bond_3ad_rx_indication()
2259 if (!port->slave) { bond_3ad_rx_indication()
2260 net_warn_ratelimited("%s: Warning: port of slave %s is uninitialized\n", bond_3ad_rx_indication()
2261 slave->dev->name, slave->bond->dev->name); bond_3ad_rx_indication()
2268 netdev_dbg(slave->bond->dev, bond_3ad_rx_indication()
2269 "Received LACPDU on port %d slave %s\n", bond_3ad_rx_indication()
2271 slave->dev->name); bond_3ad_rx_indication()
2273 spin_lock(&slave->bond->mode_lock); bond_3ad_rx_indication()
2275 spin_unlock(&slave->bond->mode_lock); bond_3ad_rx_indication()
2286 netdev_dbg(slave->bond->dev, "Received Marker Information on port %d\n", bond_3ad_rx_indication()
2292 netdev_dbg(slave->bond->dev, "Received Marker Response on port %d\n", bond_3ad_rx_indication()
2298 netdev_dbg(slave->bond->dev, "Received an unknown Marker subtype on slot %d\n", bond_3ad_rx_indication()
2307 * bond_3ad_adapter_speed_changed - handle a slave's speed change indication
2308 * @slave: slave struct to work on
2312 void bond_3ad_adapter_speed_changed(struct slave *slave) bond_3ad_adapter_speed_changed() argument
2316 port = &(SLAVE_AD_INFO(slave)->port); bond_3ad_adapter_speed_changed()
2318 /* if slave is null, the whole port is not initialized */ bond_3ad_adapter_speed_changed()
2319 if (!port->slave) { bond_3ad_adapter_speed_changed()
2320 netdev_warn(slave->bond->dev, "speed changed for uninitialized port on %s\n", bond_3ad_adapter_speed_changed()
2321 slave->dev->name); bond_3ad_adapter_speed_changed()
2325 spin_lock_bh(&slave->bond->mode_lock); bond_3ad_adapter_speed_changed()
2330 netdev_dbg(slave->bond->dev, "Port %d changed speed\n", port->actor_port_number); bond_3ad_adapter_speed_changed()
2336 spin_unlock_bh(&slave->bond->mode_lock); bond_3ad_adapter_speed_changed()
2340 * bond_3ad_adapter_duplex_changed - handle a slave's duplex change indication
2341 * @slave: slave struct to work on
2345 void bond_3ad_adapter_duplex_changed(struct slave *slave) bond_3ad_adapter_duplex_changed() argument
2349 port = &(SLAVE_AD_INFO(slave)->port); bond_3ad_adapter_duplex_changed()
2351 /* if slave is null, the whole port is not initialized */ bond_3ad_adapter_duplex_changed()
2352 if (!port->slave) { bond_3ad_adapter_duplex_changed()
2353 netdev_warn(slave->bond->dev, "duplex changed for uninitialized port on %s\n", bond_3ad_adapter_duplex_changed()
2354 slave->dev->name); bond_3ad_adapter_duplex_changed()
2358 spin_lock_bh(&slave->bond->mode_lock); bond_3ad_adapter_duplex_changed()
2363 netdev_dbg(slave->bond->dev, "Port %d slave %s changed duplex\n", bond_3ad_adapter_duplex_changed()
2364 port->actor_port_number, slave->dev->name); bond_3ad_adapter_duplex_changed()
2372 spin_unlock_bh(&slave->bond->mode_lock); bond_3ad_adapter_duplex_changed()
2376 * bond_3ad_handle_link_change - handle a slave's link status change indication
2377 * @slave: slave struct to work on
2382 void bond_3ad_handle_link_change(struct slave *slave, char link) bond_3ad_handle_link_change() argument
2386 port = &(SLAVE_AD_INFO(slave)->port); bond_3ad_handle_link_change()
2388 /* if slave is null, the whole port is not initialized */ bond_3ad_handle_link_change()
2389 if (!port->slave) { bond_3ad_handle_link_change()
2390 netdev_warn(slave->bond->dev, "link status changed for uninitialized port on %s\n", bond_3ad_handle_link_change()
2391 slave->dev->name); bond_3ad_handle_link_change()
2395 spin_lock_bh(&slave->bond->mode_lock); bond_3ad_handle_link_change()
2416 netdev_dbg(slave->bond->dev, "Port %d changed link status to %s\n", bond_3ad_handle_link_change()
2424 spin_unlock_bh(&slave->bond->mode_lock); bond_3ad_handle_link_change()
2429 bond_update_slave_arr(slave->bond, NULL); bond_3ad_handle_link_change()
2448 struct slave *first_slave; bond_3ad_set_carrier()
2490 struct slave *slave; __bond_3ad_get_active_agg_info() local
2493 bond_for_each_slave_rcu(bond, slave, iter) { bond_for_each_slave_rcu()
2494 port = &(SLAVE_AD_INFO(slave)->port); bond_for_each_slave_rcu()
2525 struct slave *slave) bond_3ad_lacpdu_recv()
2539 return bond_3ad_rx_indication(lacpdu, slave, skb->len); bond_3ad_lacpdu_recv()
2557 struct slave *slave; bond_3ad_update_lacp_rate() local
2562 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
2563 port = &(SLAVE_AD_INFO(slave)->port); bond_for_each_slave()
2524 bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave) bond_3ad_lacpdu_recv() argument
H A Dbond_options.c201 .desc = "Packets to send per slave in RR mode",
318 .desc = "Reselect primary slave once it comes up",
332 .desc = "Currently active slave",
342 .desc = "Set queue id of a slave",
363 .desc = "The number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch",
693 struct slave *slave) __bond_option_active_slave_get()
695 return bond_uses_primary(bond) && slave ? slave->dev : NULL; __bond_option_active_slave_get()
700 struct slave *slave = rcu_dereference(bond->curr_active_slave); bond_option_active_slave_get_rcu() local
702 return __bond_option_active_slave_get(bond, slave); bond_option_active_slave_get_rcu()
723 netdev_err(bond->dev, "Device %s is not bonding slave\n", bond_option_active_slave_set()
729 netdev_err(bond->dev, "Device %s is not our slave\n", bond_option_active_slave_set()
738 netdev_info(bond->dev, "Clearing current active slave\n"); bond_option_active_slave_set()
742 struct slave *old_active = rtnl_dereference(bond->curr_active_slave); bond_option_active_slave_set()
743 struct slave *new_active = bond_slave_get_rtnl(slave_dev); bond_option_active_slave_set()
749 netdev_info(bond->dev, "%s is already the current active slave\n", bond_option_active_slave_set()
754 netdev_info(bond->dev, "Setting %s as active slave\n", bond_option_active_slave_set()
758 netdev_err(bond->dev, "Could not set %s as active slave; either %s is down or the link is down\n", bond_option_active_slave_set()
912 struct slave *slave; _bond_options_arp_ip_target_set() local
915 bond_for_each_slave(bond, slave, iter) _bond_options_arp_ip_target_set()
916 slave->target_last_arp_rx[slot] = last_rx; _bond_options_arp_ip_target_set()
960 struct slave *slave; bond_option_arp_ip_target_rem() local
982 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
983 targets_rx = slave->target_last_arp_rx; bond_for_each_slave()
1061 struct slave *slave; bond_option_primary_set() local
1070 netdev_info(bond->dev, "Setting primary slave to None\n"); bond_option_primary_set()
1077 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1078 if (strncmp(slave->dev->name, primary, IFNAMSIZ) == 0) { bond_for_each_slave()
1079 netdev_info(bond->dev, "Setting %s as primary slave\n", bond_for_each_slave()
1080 slave->dev->name); bond_for_each_slave()
1081 rcu_assign_pointer(bond->primary_slave, slave); bond_for_each_slave()
1082 strcpy(bond->params.primary, slave->dev->name); bond_for_each_slave()
1089 netdev_info(bond->dev, "Setting primary slave to None\n");
1161 struct slave *slave; bond_option_all_slaves_active_set() local
1166 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1167 if (!bond_is_active_slave(slave)) { bond_for_each_slave()
1169 slave->inactive = 0; bond_for_each_slave()
1171 slave->inactive = 1; bond_for_each_slave()
1239 struct slave *slave, *update_slave; bond_option_queue_id_set() local
1268 /* Search for thes slave and check for duplicate qids */ bond_option_queue_id_set()
1270 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
1271 if (sdev == slave->dev) bond_for_each_slave()
1273 * slave for dups, since we're overwriting it bond_for_each_slave()
1275 update_slave = slave; bond_for_each_slave()
1276 else if (qid && qid == slave->queue_id) { bond_for_each_slave()
1284 /* Actually set the qids for the slave */
1321 netdev_info(bond->dev, "Adding slave %s\n", dev->name); bond_option_slaves_set()
1326 netdev_info(bond->dev, "Removing slave %s\n", dev->name); bond_option_slaves_set()
692 __bond_option_active_slave_get(struct bonding *bond, struct slave *slave) __bond_option_active_slave_get() argument
H A Dbond_netlink.c38 struct slave *slave = bond_slave_get_rtnl(slave_dev); bond_fill_slave_info() local
40 if (nla_put_u8(skb, IFLA_BOND_SLAVE_STATE, bond_slave_state(slave))) bond_fill_slave_info()
43 if (nla_put_u8(skb, IFLA_BOND_SLAVE_MII_STATUS, slave->link)) bond_fill_slave_info()
47 slave->link_failure_count)) bond_fill_slave_info()
51 slave_dev->addr_len, slave->perm_hwaddr)) bond_fill_slave_info()
54 if (nla_put_u16(skb, IFLA_BOND_SLAVE_QUEUE_ID, slave->queue_id)) bond_fill_slave_info()
57 if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) { bond_fill_slave_info()
60 agg = SLAVE_AD_INFO(slave)->port.aggregator; bond_fill_slave_info()
434 const struct net_device *slave; bond_option_active_slave_get_ifindex() local
438 slave = bond_option_active_slave_get_rcu(bond); bond_option_active_slave_get_ifindex()
439 ifindex = slave ? slave->ifindex : 0; bond_option_active_slave_get_ifindex()
451 struct slave *primary; bond_fill_info()
H A Dbond_sysfs.c182 struct slave *slave; bonding_show_slaves() local
188 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
196 res += sprintf(buf + res, "%s ", slave->dev->name); bond_for_each_slave()
422 /* Show the primary slave. */ bonding_show_primary()
428 struct slave *primary; bonding_show_primary()
609 struct slave *slave; bonding_show_queue_id() local
615 bond_for_each_slave(bond, slave, iter) { bond_for_each_slave()
624 slave->dev->name, slave->queue_id); bond_for_each_slave()
/linux-4.1.27/sound/core/
H A Dvmaster.c2 * Virtual master and slave controls
28 * link master - this contains a list of slave controls that are
45 * link slave - this contains a slave control element
48 * master control. A slave may have either one or two channels.
58 struct snd_kcontrol slave; /* the copy of original control entry */ member in struct:link_slave
61 static int slave_update(struct link_slave *slave) slave_update() argument
69 uctl->id = slave->slave.id; slave_update()
70 err = slave->slave.get(&slave->slave, uctl); slave_update()
71 for (ch = 0; ch < slave->info.count; ch++) slave_update()
72 slave->vals[ch] = uctl->value.integer.value[ch]; slave_update()
77 /* get the slave ctl info and save the initial values */ slave_init()
78 static int slave_init(struct link_slave *slave) slave_init() argument
83 if (slave->info.count) { slave_init()
85 if (slave->flags & SND_CTL_SLAVE_NEED_UPDATE) slave_init()
86 return slave_update(slave); slave_init()
93 uinfo->id = slave->slave.id; slave_init()
94 err = slave->slave.info(&slave->slave, uinfo); slave_init()
99 slave->info.type = uinfo->type; slave_init()
100 slave->info.count = uinfo->count; slave_init()
101 if (slave->info.count > 2 || slave_init()
102 (slave->info.type != SNDRV_CTL_ELEM_TYPE_INTEGER && slave_init()
103 slave->info.type != SNDRV_CTL_ELEM_TYPE_BOOLEAN)) { slave_init()
104 pr_err("ALSA: vmaster: invalid slave element\n"); slave_init()
108 slave->info.min_val = uinfo->value.integer.min; slave_init()
109 slave->info.max_val = uinfo->value.integer.max; slave_init()
112 return slave_update(slave); slave_init()
118 struct link_slave *slave; master_init() local
123 list_for_each_entry(slave, &master->slaves, list) { master_init()
124 int err = slave_init(slave); master_init()
127 master->info = slave->info; master_init()
138 static int slave_get_val(struct link_slave *slave, slave_get_val() argument
143 err = slave_init(slave); slave_get_val()
146 for (ch = 0; ch < slave->info.count; ch++) slave_get_val()
147 ucontrol->value.integer.value[ch] = slave->vals[ch]; slave_get_val()
151 static int slave_put_val(struct link_slave *slave, slave_put_val() argument
156 err = master_init(slave->master); slave_put_val()
160 switch (slave->info.type) { slave_put_val()
162 for (ch = 0; ch < slave->info.count; ch++) slave_put_val()
164 !!slave->master->val; slave_put_val()
167 for (ch = 0; ch < slave->info.count; ch++) { slave_put_val()
170 vol += slave->master->val - slave->master->info.max_val; slave_put_val()
171 if (vol < slave->info.min_val) slave_put_val()
172 vol = slave->info.min_val; slave_put_val()
173 else if (vol > slave->info.max_val) slave_put_val()
174 vol = slave->info.max_val; slave_put_val()
179 return slave->slave.put(&slave->slave, ucontrol); slave_put_val()
188 struct link_slave *slave = snd_kcontrol_chip(kcontrol); slave_info() local
189 return slave->slave.info(&slave->slave, uinfo); slave_info()
195 struct link_slave *slave = snd_kcontrol_chip(kcontrol); slave_get() local
196 return slave_get_val(slave, ucontrol); slave_get()
202 struct link_slave *slave = snd_kcontrol_chip(kcontrol); slave_put() local
205 err = slave_init(slave); slave_put()
208 for (ch = 0; ch < slave->info.count; ch++) { slave_put()
209 if (slave->vals[ch] != ucontrol->value.integer.value[ch]) { slave_put()
211 slave->vals[ch] = ucontrol->value.integer.value[ch]; slave_put()
216 err = slave_put_val(slave, ucontrol); slave_put()
226 struct link_slave *slave = snd_kcontrol_chip(kcontrol); slave_tlv_cmd() local
228 return slave->slave.tlv.c(&slave->slave, op_flag, size, tlv); slave_tlv_cmd()
233 struct link_slave *slave = snd_kcontrol_chip(kcontrol); slave_free() local
234 if (slave->slave.private_free) slave_free()
235 slave->slave.private_free(&slave->slave); slave_free()
236 if (slave->master) slave_free()
237 list_del(&slave->list); slave_free()
238 kfree(slave); slave_free()
242 * Add a slave control to the group with the given master control
253 int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, _snd_ctl_add_slave() argument
260 slave->count * sizeof(*slave->vd), GFP_KERNEL); _snd_ctl_add_slave()
263 srec->kctl = slave; _snd_ctl_add_slave()
264 srec->slave = *slave; _snd_ctl_add_slave()
265 memcpy(srec->slave.vd, slave->vd, slave->count * sizeof(*slave->vd)); _snd_ctl_add_slave()
270 slave->info = slave_info; _snd_ctl_add_slave()
271 slave->get = slave_get; _snd_ctl_add_slave()
272 slave->put = slave_put; _snd_ctl_add_slave()
273 if (slave->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) _snd_ctl_add_slave()
274 slave->tlv.c = slave_tlv_cmd; _snd_ctl_add_slave()
275 slave->private_data = srec; _snd_ctl_add_slave()
276 slave->private_free = slave_free; _snd_ctl_add_slave()
315 struct link_slave *slave; sync_slaves() local
321 list_for_each_entry(slave, &master->slaves, list) { sync_slaves()
323 uval->id = slave->slave.id; sync_slaves()
324 slave_get_val(slave, uval); sync_slaves()
326 slave_put_val(slave, uval); sync_slaves()
359 struct link_slave *slave, *n; master_free() local
361 /* free all slave links and retore the original slave kctls */ master_free()
362 list_for_each_entry_safe(slave, n, &master->slaves, list) { master_free()
363 struct snd_kcontrol *sctl = slave->kctl; master_free()
365 memcpy(sctl, &slave->slave, sizeof(*sctl)); master_free()
366 memcpy(sctl->vd, slave->slave.vd, master_free()
369 kfree(slave); master_free()
382 * After creating a vmaster element, you can add the slave controls
461 * Forcibly call the put callback of each slave and call the hook function
H A Dtimer.c83 /* list of slave instances */
86 /* lock for slave active lists */
176 * look for a master instance matching with the slave id of the given slave.
177 * when found, relink the open_link of the slave.
181 static void snd_timer_check_slave(struct snd_timer_instance *slave) snd_timer_check_slave() argument
189 if (slave->slave_class == master->slave_class && snd_timer_check_slave()
190 slave->slave_id == master->slave_id) { snd_timer_check_slave()
191 list_move_tail(&slave->open_list, snd_timer_check_slave()
194 slave->master = master; snd_timer_check_slave()
195 slave->timer = master->timer; snd_timer_check_slave()
204 * look for slave instances matching with the slave id of the given master.
211 struct snd_timer_instance *slave, *tmp; snd_timer_check_master() local
214 list_for_each_entry_safe(slave, tmp, &snd_timer_slave_list, open_list) { snd_timer_check_master()
215 if (slave->slave_class == master->slave_class && snd_timer_check_master()
216 slave->slave_id == master->slave_id) { snd_timer_check_master()
217 list_move_tail(&slave->open_list, &master->slave_list_head); snd_timer_check_master()
220 slave->master = master; snd_timer_check_master()
221 slave->timer = master->timer; snd_timer_check_master()
222 if (slave->flags & SNDRV_TIMER_IFLG_RUNNING) snd_timer_check_master()
223 list_add_tail(&slave->active_list, snd_timer_check_master()
233 * when opening a master, the slave id must be here given.
243 /* open a slave instance */ snd_timer_open()
246 pr_debug("ALSA: timer: invalid slave class %i\n", snd_timer_open()
316 struct snd_timer_instance *slave, *tmp; snd_timer_close() local
353 /* remove slave links */ snd_timer_close()
356 list_for_each_entry_safe(slave, tmp, &timeri->slave_list_head, snd_timer_close()
358 list_move_tail(&slave->open_list, &snd_timer_slave_list); snd_timer_close()
359 slave->master = NULL; snd_timer_close()
360 slave->timer = NULL; snd_timer_close()
361 list_del_init(&slave->ack_list); snd_timer_close()
362 list_del_init(&slave->active_list); snd_timer_close()
/linux-4.1.27/include/net/
H A Dbonding.h52 /* slave list primitives */
77 * @pos: current slave
152 struct slave { struct
162 u8 backup:1, /* indicates backup slave. Value corresponds with
164 inactive:1, /* indicates inactive slave */
184 struct slave *arr[0];
194 * Get rcu_read_lock when reading or RTNL when writing slave list.
198 struct slave __rcu *curr_active_slave;
199 struct slave __rcu *current_arp_slave;
200 struct slave __rcu *primary_slave;
205 struct slave *);
240 ((struct slave *) rcu_dereference(dev->rx_handler_data))
243 ((struct slave *) rtnl_dereference(dev->rx_handler_data))
245 void bond_queue_slave_event(struct slave *slave);
257 static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, bond_get_slave_by_dev()
263 static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) bond_get_bond_by_slave() argument
265 return slave->bond; bond_get_bond_by_slave()
310 static inline bool bond_slave_is_up(struct slave *slave) bond_slave_is_up() argument
312 return netif_running(slave->dev) && netif_carrier_ok(slave->dev); bond_slave_is_up()
315 static inline void bond_set_active_slave(struct slave *slave) bond_set_active_slave() argument
317 if (slave->backup) { bond_set_active_slave()
318 slave->backup = 0; bond_set_active_slave()
319 bond_queue_slave_event(slave); bond_set_active_slave()
320 rtmsg_ifinfo(RTM_NEWLINK, slave->dev, 0, GFP_ATOMIC); bond_set_active_slave()
324 static inline void bond_set_backup_slave(struct slave *slave) bond_set_backup_slave() argument
326 if (!slave->backup) { bond_set_backup_slave()
327 slave->backup = 1; bond_set_backup_slave()
328 bond_queue_slave_event(slave); bond_set_backup_slave()
329 rtmsg_ifinfo(RTM_NEWLINK, slave->dev, 0, GFP_ATOMIC); bond_set_backup_slave()
333 static inline void bond_set_slave_state(struct slave *slave, bond_set_slave_state() argument
336 if (slave->backup == slave_state) bond_set_slave_state()
339 slave->backup = slave_state; bond_set_slave_state()
341 rtmsg_ifinfo(RTM_NEWLINK, slave->dev, 0, GFP_ATOMIC); bond_set_slave_state()
342 bond_queue_slave_event(slave); bond_set_slave_state()
343 slave->should_notify = 0; bond_set_slave_state()
345 if (slave->should_notify) bond_set_slave_state()
346 slave->should_notify = 0; bond_set_slave_state()
348 slave->should_notify = 1; bond_set_slave_state()
355 struct slave *tmp; bond_slave_state_change()
368 struct slave *tmp; bond_slave_state_notify()
378 static inline int bond_slave_state(struct slave *slave) bond_slave_state() argument
380 return slave->backup; bond_slave_state()
383 static inline bool bond_is_active_slave(struct slave *slave) bond_is_active_slave() argument
385 return !bond_slave_state(slave); bond_is_active_slave()
388 static inline bool bond_slave_can_tx(struct slave *slave) bond_slave_can_tx() argument
390 return bond_slave_is_up(slave) && slave->link == BOND_LINK_UP && bond_slave_can_tx()
391 bond_is_active_slave(slave); bond_slave_can_tx()
420 struct slave *slave) slave_do_arp_validate()
422 return bond->params.arp_validate & (1 << bond_slave_state(slave)); slave_do_arp_validate()
435 /* Get the oldest arp which we've received on this slave for bond's
439 struct slave *slave) slave_oldest_target_arp_rx()
442 unsigned long ret = slave->target_last_arp_rx[0]; slave_oldest_target_arp_rx()
445 if (time_before(slave->target_last_arp_rx[i], ret)) slave_oldest_target_arp_rx()
446 ret = slave->target_last_arp_rx[i]; slave_oldest_target_arp_rx()
452 struct slave *slave) slave_last_rx()
455 return slave_oldest_target_arp_rx(bond, slave); slave_last_rx()
457 return slave->last_rx; slave_last_rx()
461 static inline void bond_netpoll_send_skb(const struct slave *slave, bond_netpoll_send_skb() argument
464 struct netpoll *np = slave->np; bond_netpoll_send_skb()
470 static inline void bond_netpoll_send_skb(const struct slave *slave, bond_netpoll_send_skb() argument
476 static inline void bond_set_slave_inactive_flags(struct slave *slave, bond_set_slave_inactive_flags() argument
479 if (!bond_is_lb(slave->bond)) bond_set_slave_inactive_flags()
480 bond_set_slave_state(slave, BOND_STATE_BACKUP, notify); bond_set_slave_inactive_flags()
481 if (!slave->bond->params.all_slaves_active) bond_set_slave_inactive_flags()
482 slave->inactive = 1; bond_set_slave_inactive_flags()
485 static inline void bond_set_slave_active_flags(struct slave *slave, bond_set_slave_active_flags() argument
488 bond_set_slave_state(slave, BOND_STATE_ACTIVE, notify); bond_set_slave_active_flags()
489 slave->inactive = 0; bond_set_slave_active_flags()
492 static inline bool bond_is_slave_inactive(struct slave *slave) bond_is_slave_inactive() argument
494 return slave->inactive; bond_is_slave_inactive()
497 static inline void bond_set_slave_link_state(struct slave *slave, int state) bond_set_slave_link_state() argument
499 slave->link = state; bond_set_slave_link_state()
500 bond_queue_slave_event(slave); bond_set_slave_link_state()
527 int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave);
533 int bond_sysfs_slave_add(struct slave *slave);
534 void bond_sysfs_slave_del(struct slave *slave);
540 void bond_change_active_slave(struct bonding *bond, struct slave *new_active);
556 int bond_update_slave_arr(struct bonding *bond, struct slave *skipslave);
582 static inline struct slave *bond_slave_has_mac(struct bonding *bond, bond_slave_has_mac()
586 struct slave *tmp; bond_slave_has_mac()
596 static inline struct slave *bond_slave_has_mac_rcu(struct bonding *bond, bond_slave_has_mac_rcu()
600 struct slave *tmp; bond_slave_has_mac_rcu()
613 struct slave *tmp; bond_slave_has_mac_rx()
419 slave_do_arp_validate(struct bonding *bond, struct slave *slave) slave_do_arp_validate() argument
438 slave_oldest_target_arp_rx(struct bonding *bond, struct slave *slave) slave_oldest_target_arp_rx() argument
451 slave_last_rx(struct bonding *bond, struct slave *slave) slave_last_rx() argument
H A Dbond_3ad.h174 struct slave;
197 struct slave *slave; /* pointer to the bond slave that this aggregator belongs to */ member in struct:aggregator
245 struct slave *slave; /* pointer to the bond slave that this port belongs to */ member in struct:port
264 #define SLAVE_AD_INFO(slave) ((slave)->ad_info)
296 void bond_3ad_bind_slave(struct slave *slave);
297 void bond_3ad_unbind_slave(struct slave *slave);
300 void bond_3ad_adapter_speed_changed(struct slave *slave);
301 void bond_3ad_adapter_duplex_changed(struct slave *slave);
302 void bond_3ad_handle_link_change(struct slave *slave, char link);
307 struct slave *slave);
H A Dbond_alb.h28 struct slave;
31 #define SLAVE_TLB_INFO(slave) ((slave)->tlb_info)
65 /* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is
72 struct slave *tx_slave; /* A pointer to slave used for transmiting
127 struct slave *slave; /* the slave assigned to this client */ member in struct:rlb_client_info
135 * slave for transmit.
137 u32 load; /* Each slave sums the loadHistory of all clients
154 struct slave *rx_slave;/* last slave to xmit from */
171 int bond_alb_init_slave(struct bonding *bond, struct slave *slave);
172 void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave);
173 void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char link);
174 void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave);
/linux-4.1.27/drivers/mtd/
H A Dmtdpart.c327 * This function unregisters and destroy all slave MTD objects which are
333 struct mtd_part *slave, *next; del_mtd_partitions() local
337 list_for_each_entry_safe(slave, next, &mtd_partitions, list) del_mtd_partitions()
338 if (slave->master == master) { del_mtd_partitions()
339 ret = del_mtd_device(&slave->mtd); del_mtd_partitions()
344 list_del(&slave->list); del_mtd_partitions()
345 free_partition(slave); del_mtd_partitions()
356 struct mtd_part *slave; allocate_partition() local
360 slave = kzalloc(sizeof(*slave), GFP_KERNEL); allocate_partition()
362 if (!name || !slave) { allocate_partition()
366 kfree(slave); allocate_partition()
371 slave->mtd.type = master->type; allocate_partition()
372 slave->mtd.flags = master->flags & ~part->mask_flags; allocate_partition()
373 slave->mtd.size = part->size; allocate_partition()
374 slave->mtd.writesize = master->writesize; allocate_partition()
375 slave->mtd.writebufsize = master->writebufsize; allocate_partition()
376 slave->mtd.oobsize = master->oobsize; allocate_partition()
377 slave->mtd.oobavail = master->oobavail; allocate_partition()
378 slave->mtd.subpage_sft = master->subpage_sft; allocate_partition()
380 slave->mtd.name = name; allocate_partition()
381 slave->mtd.owner = master->owner; allocate_partition()
391 slave->mtd.dev.parent = IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER) ? allocate_partition()
395 slave->mtd._read = part_read; allocate_partition()
396 slave->mtd._write = part_write; allocate_partition()
399 slave->mtd._panic_write = part_panic_write; allocate_partition()
402 slave->mtd._point = part_point; allocate_partition()
403 slave->mtd._unpoint = part_unpoint; allocate_partition()
407 slave->mtd._get_unmapped_area = part_get_unmapped_area; allocate_partition()
409 slave->mtd._read_oob = part_read_oob; allocate_partition()
411 slave->mtd._write_oob = part_write_oob; allocate_partition()
413 slave->mtd._read_user_prot_reg = part_read_user_prot_reg; allocate_partition()
415 slave->mtd._read_fact_prot_reg = part_read_fact_prot_reg; allocate_partition()
417 slave->mtd._write_user_prot_reg = part_write_user_prot_reg; allocate_partition()
419 slave->mtd._lock_user_prot_reg = part_lock_user_prot_reg; allocate_partition()
421 slave->mtd._get_user_prot_info = part_get_user_prot_info; allocate_partition()
423 slave->mtd._get_fact_prot_info = part_get_fact_prot_info; allocate_partition()
425 slave->mtd._sync = part_sync; allocate_partition()
428 slave->mtd._suspend = part_suspend; allocate_partition()
429 slave->mtd._resume = part_resume; allocate_partition()
432 slave->mtd._writev = part_writev; allocate_partition()
434 slave->mtd._lock = part_lock; allocate_partition()
436 slave->mtd._unlock = part_unlock; allocate_partition()
438 slave->mtd._is_locked = part_is_locked; allocate_partition()
440 slave->mtd._block_isreserved = part_block_isreserved; allocate_partition()
442 slave->mtd._block_isbad = part_block_isbad; allocate_partition()
444 slave->mtd._block_markbad = part_block_markbad; allocate_partition()
445 slave->mtd._erase = part_erase; allocate_partition()
446 slave->master = master; allocate_partition()
447 slave->offset = part->offset; allocate_partition()
449 if (slave->offset == MTDPART_OFS_APPEND) allocate_partition()
450 slave->offset = cur_offset; allocate_partition()
451 if (slave->offset == MTDPART_OFS_NXTBLK) { allocate_partition()
452 slave->offset = cur_offset; allocate_partition()
455 slave->offset = (mtd_div_by_eb(cur_offset, master) + 1) * master->erasesize; allocate_partition()
458 (unsigned long long)cur_offset, (unsigned long long)slave->offset); allocate_partition()
461 if (slave->offset == MTDPART_OFS_RETAIN) { allocate_partition()
462 slave->offset = cur_offset; allocate_partition()
463 if (master->size - slave->offset >= slave->mtd.size) { allocate_partition()
464 slave->mtd.size = master->size - slave->offset allocate_partition()
465 - slave->mtd.size; allocate_partition()
468 part->name, master->size - slave->offset, allocate_partition()
469 slave->mtd.size); allocate_partition()
474 if (slave->mtd.size == MTDPART_SIZ_FULL) allocate_partition()
475 slave->mtd.size = master->size - slave->offset; allocate_partition()
477 printk(KERN_NOTICE "0x%012llx-0x%012llx : \"%s\"\n", (unsigned long long)slave->offset, allocate_partition()
478 (unsigned long long)(slave->offset + slave->mtd.size), slave->mtd.name); allocate_partition()
481 if (slave->offset >= master->size) { allocate_partition()
483 slave->offset = 0; allocate_partition()
484 slave->mtd.size = 0; allocate_partition()
489 if (slave->offset + slave->mtd.size > master->size) { allocate_partition()
490 slave->mtd.size = master->size - slave->offset; allocate_partition()
492 part->name, master->name, (unsigned long long)slave->mtd.size); allocate_partition()
497 u64 end = slave->offset + slave->mtd.size; allocate_partition()
502 for (i = 0; i < max && regions[i].offset <= slave->offset; i++) allocate_partition()
510 if (slave->mtd.erasesize < regions[i].erasesize) { allocate_partition()
511 slave->mtd.erasesize = regions[i].erasesize; allocate_partition()
514 BUG_ON(slave->mtd.erasesize == 0); allocate_partition()
517 slave->mtd.erasesize = master->erasesize; allocate_partition()
520 if ((slave->mtd.flags & MTD_WRITEABLE) && allocate_partition()
521 mtd_mod_by_eb(slave->offset, &slave->mtd)) { allocate_partition()
525 slave->mtd.flags &= ~MTD_WRITEABLE; allocate_partition()
529 if ((slave->mtd.flags & MTD_WRITEABLE) && allocate_partition()
530 mtd_mod_by_eb(slave->mtd.size, &slave->mtd)) { allocate_partition()
531 slave->mtd.flags &= ~MTD_WRITEABLE; allocate_partition()
536 slave->mtd.ecclayout = master->ecclayout; allocate_partition()
537 slave->mtd.ecc_step_size = master->ecc_step_size; allocate_partition()
538 slave->mtd.ecc_strength = master->ecc_strength; allocate_partition()
539 slave->mtd.bitflip_threshold = master->bitflip_threshold; allocate_partition()
544 while (offs < slave->mtd.size) { allocate_partition()
545 if (mtd_block_isreserved(master, offs + slave->offset)) allocate_partition()
546 slave->mtd.ecc_stats.bbtblocks++; allocate_partition()
547 else if (mtd_block_isbad(master, offs + slave->offset)) allocate_partition()
548 slave->mtd.ecc_stats.badblocks++; allocate_partition()
549 offs += slave->mtd.erasesize; allocate_partition()
554 return slave; allocate_partition()
623 struct mtd_part *slave, *next; mtd_del_partition() local
627 list_for_each_entry_safe(slave, next, &mtd_partitions, list) mtd_del_partition()
628 if ((slave->master == master) && mtd_del_partition()
629 (slave->mtd.index == partno)) { mtd_del_partition()
630 sysfs_remove_files(&slave->mtd.dev.kobj, mtd_del_partition()
632 ret = del_mtd_device(&slave->mtd); mtd_del_partition()
636 list_del(&slave->list); mtd_del_partition()
637 free_partition(slave); mtd_del_partition()
648 * and registers slave MTD objects which are bound to the master according to
659 struct mtd_part *slave; add_mtd_partitions() local
666 slave = allocate_partition(master, parts + i, i, cur_offset); add_mtd_partitions()
667 if (IS_ERR(slave)) add_mtd_partitions()
668 return PTR_ERR(slave); add_mtd_partitions()
671 list_add(&slave->list, &mtd_partitions); add_mtd_partitions()
674 add_mtd_device(&slave->mtd); add_mtd_partitions()
675 mtd_add_partition_attrs(slave); add_mtd_partitions()
677 cur_offset = slave->offset + slave->mtd.size; add_mtd_partitions()
/linux-4.1.27/arch/arm/mach-omap2/
H A Domap_hwmod_33xx_43xx_interconnect_data.c24 .slave = &am33xx_l3_main_hwmod,
32 .slave = &am33xx_l3_s_hwmod,
40 .slave = &am33xx_l4_ls_hwmod,
48 .slave = &am33xx_l4_wkup_hwmod,
56 .slave = &am33xx_l3_instr_hwmod,
64 .slave = &am33xx_prcm_hwmod,
72 .slave = &am33xx_l3_main_hwmod,
80 .slave = &am33xx_l3_main_hwmod,
88 .slave = &am33xx_l3_main_hwmod,
96 .slave = &am33xx_gfx_hwmod,
104 .slave = &am33xx_rtc_hwmod,
112 .slave = &am33xx_dcan0_hwmod,
120 .slave = &am33xx_dcan1_hwmod,
128 .slave = &am33xx_gpio1_hwmod,
136 .slave = &am33xx_gpio2_hwmod,
144 .slave = &am33xx_gpio3_hwmod,
151 .slave = &am33xx_mdio_hwmod,
166 .slave = &am33xx_elm_hwmod,
183 .slave = &am33xx_epwmss0_hwmod,
191 .slave = &am33xx_ecap0_hwmod,
198 .slave = &am33xx_eqep0_hwmod,
205 .slave = &am33xx_ehrpwm0_hwmod,
222 .slave = &am33xx_epwmss1_hwmod,
230 .slave = &am33xx_ecap1_hwmod,
237 .slave = &am33xx_eqep1_hwmod,
244 .slave = &am33xx_ehrpwm1_hwmod,
260 .slave = &am33xx_epwmss2_hwmod,
268 .slave = &am33xx_ecap2_hwmod,
275 .slave = &am33xx_eqep2_hwmod,
282 .slave = &am33xx_ehrpwm2_hwmod,
299 .slave = &am33xx_gpmc_hwmod,
308 .slave = &am33xx_i2c2_hwmod,
315 .slave = &am33xx_i2c3_hwmod,
323 .slave = &am33xx_mailbox_hwmod,
331 .slave = &am33xx_spinlock_hwmod,
348 .slave = &am33xx_mcasp0_hwmod,
366 .slave = &am33xx_mcasp1_hwmod,
384 .slave = &am33xx_mmc0_hwmod,
402 .slave = &am33xx_mmc1_hwmod,
420 .slave = &am33xx_mmc2_hwmod,
429 .slave = &am33xx_spi0_hwmod,
437 .slave = &am33xx_spi1_hwmod,
445 .slave = &am33xx_timer2_hwmod,
453 .slave = &am33xx_timer3_hwmod,
461 .slave = &am33xx_timer4_hwmod,
469 .slave = &am33xx_timer5_hwmod,
477 .slave = &am33xx_timer6_hwmod,
485 .slave = &am33xx_timer7_hwmod,
493 .slave = &am33xx_tpcc_hwmod,
510 .slave = &am33xx_tptc0_hwmod,
528 .slave = &am33xx_tptc1_hwmod,
546 .slave = &am33xx_tptc2_hwmod,
555 .slave = &am33xx_uart2_hwmod,
563 .slave = &am33xx_uart3_hwmod,
571 .slave = &am33xx_uart4_hwmod,
579 .slave = &am33xx_uart5_hwmod,
587 .slave = &am33xx_uart6_hwmod,
595 .slave = &am33xx_ocmcram_hwmod,
611 .slave = &am33xx_sha0_hwmod,
629 .slave = &am33xx_aes0_hwmod,
H A Domap_hwmod_2xxx_interconnect_data.c30 .slave = &omap2xxx_l4_core_hwmod,
37 .slave = &omap2xxx_l3_main_hwmod,
44 .slave = &omap2xxx_l3_main_hwmod,
57 .slave = &omap2xxx_l4_wkup_hwmod,
64 .slave = &omap2xxx_uart1_hwmod,
72 .slave = &omap2xxx_uart2_hwmod,
80 .slave = &omap2xxx_uart3_hwmod,
88 .slave = &omap2xxx_mcspi1_hwmod,
96 .slave = &omap2xxx_mcspi2_hwmod,
104 .slave = &omap2xxx_timer2_hwmod,
112 .slave = &omap2xxx_timer3_hwmod,
120 .slave = &omap2xxx_timer4_hwmod,
128 .slave = &omap2xxx_timer5_hwmod,
136 .slave = &omap2xxx_timer6_hwmod,
144 .slave = &omap2xxx_timer7_hwmod,
152 .slave = &omap2xxx_timer8_hwmod,
160 .slave = &omap2xxx_timer9_hwmod,
168 .slave = &omap2xxx_timer10_hwmod,
176 .slave = &omap2xxx_timer11_hwmod,
184 .slave = &omap2xxx_timer12_hwmod,
192 .slave = &omap2xxx_dss_core_hwmod,
207 .slave = &omap2xxx_dss_dispc_hwmod,
222 .slave = &omap2xxx_dss_rfbi_hwmod,
237 .slave = &omap2xxx_dss_venc_hwmod,
253 .slave = &omap2xxx_rng_hwmod,
261 .slave = &omap2xxx_sham_hwmod,
269 .slave = &omap2xxx_aes_hwmod,
H A Domap_hwmod_43xx_data.c588 .slave = &am43xx_l4_hs_hwmod,
595 .slave = &am33xx_l4_wkup_hwmod,
602 .slave = &am43xx_wkup_m3_hwmod,
609 .slave = &am33xx_pruss_hwmod,
616 .slave = &am33xx_smartreflex0_hwmod,
623 .slave = &am33xx_smartreflex1_hwmod,
630 .slave = &am43xx_control_hwmod,
637 .slave = &am33xx_i2c1_hwmod,
644 .slave = &am43xx_gpio0_hwmod,
651 .slave = &am43xx_adc_tsc_hwmod,
658 .slave = &am33xx_cpgmac0_hwmod,
665 .slave = &am33xx_timer1_hwmod,
672 .slave = &am33xx_uart1_hwmod,
679 .slave = &am33xx_wd_timer1_hwmod,
686 .slave = &am43xx_synctimer_hwmod,
693 .slave = &am43xx_timer8_hwmod,
700 .slave = &am43xx_timer9_hwmod,
707 .slave = &am43xx_timer10_hwmod,
714 .slave = &am43xx_timer11_hwmod,
721 .slave = &am43xx_epwmss3_hwmod,
728 .slave = &am43xx_ehrpwm3_hwmod,
735 .slave = &am43xx_epwmss4_hwmod,
742 .slave = &am43xx_ehrpwm4_hwmod,
749 .slave = &am43xx_epwmss5_hwmod,
756 .slave = &am43xx_ehrpwm5_hwmod,
763 .slave = &am43xx_spi2_hwmod,
770 .slave = &am43xx_spi3_hwmod,
777 .slave = &am43xx_spi4_hwmod,
784 .slave = &am43xx_gpio4_hwmod,
791 .slave = &am43xx_gpio5_hwmod,
798 .slave = &am43xx_ocp2scp0_hwmod,
805 .slave = &am43xx_ocp2scp1_hwmod,
812 .slave = &am43xx_usb_otg_ss0_hwmod,
819 .slave = &am43xx_usb_otg_ss1_hwmod,
826 .slave = &am43xx_qspi_hwmod,
833 .slave = &am33xx_l3_main_hwmod,
840 .slave = &am43xx_dss_core_hwmod,
847 .slave = &am43xx_dss_dispc_hwmod,
854 .slave = &am43xx_dss_rfbi_hwmod,
861 .slave = &am43xx_hdq1w_hwmod,
868 .slave = &am33xx_l3_main_hwmod,
875 .slave = &am33xx_l3_main_hwmod,
882 .slave = &am43xx_vpfe0_hwmod,
889 .slave = &am43xx_vpfe1_hwmod,
H A Domap_hwmod_2430_data.c445 .slave = &omap2xxx_l3_main_hwmod,
453 .slave = &omap2430_i2c1_hwmod,
461 .slave = &omap2430_i2c2_hwmod,
469 .slave = &omap2430_usbhsotg_hwmod,
477 .slave = &omap2430_mmc1_hwmod,
485 .slave = &omap2430_mmc2_hwmod,
493 .slave = &omap2430_mcspi3_hwmod,
501 .slave = &omap2430_iva_hwmod,
509 .slave = &omap2xxx_timer1_hwmod,
517 .slave = &omap2xxx_wd_timer2_hwmod,
525 .slave = &omap2xxx_gpio1_hwmod,
533 .slave = &omap2xxx_gpio2_hwmod,
541 .slave = &omap2xxx_gpio3_hwmod,
549 .slave = &omap2xxx_gpio4_hwmod,
557 .slave = &omap2430_gpio5_hwmod,
565 .slave = &omap2xxx_l3_main_hwmod,
573 .slave = &omap2430_dma_system_hwmod,
582 .slave = &omap2430_mailbox_hwmod,
589 .slave = &omap2430_mcbsp1_hwmod,
597 .slave = &omap2430_mcbsp2_hwmod,
605 .slave = &omap2430_mcbsp3_hwmod,
613 .slave = &omap2430_mcbsp4_hwmod,
621 .slave = &omap2430_mcbsp5_hwmod,
629 .slave = &omap2430_hdq1w_hwmod,
638 .slave = &omap2xxx_counter_32k_hwmod,
645 .slave = &omap2xxx_gpmc_hwmod,
H A Domap_hwmod_2420_data.c284 .slave = &omap2420_i2c1_hwmod,
292 .slave = &omap2420_i2c2_hwmod,
300 .slave = &omap2420_iva_hwmod,
308 .slave = &omap2420_dsp_hwmod,
316 .slave = &omap2xxx_timer1_hwmod,
324 .slave = &omap2xxx_wd_timer2_hwmod,
332 .slave = &omap2xxx_gpio1_hwmod,
340 .slave = &omap2xxx_gpio2_hwmod,
348 .slave = &omap2xxx_gpio3_hwmod,
356 .slave = &omap2xxx_gpio4_hwmod,
364 .slave = &omap2xxx_l3_main_hwmod,
372 .slave = &omap2420_dma_system_hwmod,
381 .slave = &omap2420_mailbox_hwmod,
388 .slave = &omap2420_mcbsp1_hwmod,
396 .slave = &omap2420_mcbsp2_hwmod,
404 .slave = &omap2420_msdi1_hwmod,
412 .slave = &omap2420_hdq1w_hwmod,
422 .slave = &omap2xxx_counter_32k_hwmod,
429 .slave = &omap2xxx_gpmc_hwmod,
H A Domap_hwmod_54xx_data.c1146 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2039 .slave = &omap54xx_ocp2scp3_hwmod,
2096 .slave = &omap54xx_sata_hwmod,
2108 .slave = &omap54xx_dmm_hwmod,
2116 .slave = &omap54xx_l3_instr_hwmod,
2124 .slave = &omap54xx_l3_main_1_hwmod,
2132 .slave = &omap54xx_l3_main_1_hwmod,
2140 .slave = &omap54xx_mmu_dsp_hwmod,
2148 .slave = &omap54xx_l3_main_1_hwmod,
2156 .slave = &omap54xx_l3_main_2_hwmod,
2164 .slave = &omap54xx_l3_main_2_hwmod,
2172 .slave = &omap54xx_mmu_ipu_hwmod,
2180 .slave = &omap54xx_l3_main_3_hwmod,
2188 .slave = &omap54xx_l3_main_3_hwmod,
2196 .slave = &omap54xx_l3_main_3_hwmod,
2204 .slave = &omap54xx_l4_abe_hwmod,
2212 .slave = &omap54xx_l4_abe_hwmod,
2220 .slave = &omap54xx_l4_cfg_hwmod,
2228 .slave = &omap54xx_l4_per_hwmod,
2236 .slave = &omap54xx_l4_wkup_hwmod,
2244 .slave = &omap54xx_mpu_private_hwmod,
2252 .slave = &omap54xx_counter_32k_hwmod,
2269 .slave = &omap54xx_dma_system_hwmod,
2278 .slave = &omap54xx_dmic_hwmod,
2286 .slave = &omap54xx_dss_hwmod,
2294 .slave = &omap54xx_dss_dispc_hwmod,
2302 .slave = &omap54xx_dss_dsi1_a_hwmod,
2310 .slave = &omap54xx_dss_dsi1_c_hwmod,
2318 .slave = &omap54xx_dss_hdmi_hwmod,
2326 .slave = &omap54xx_dss_rfbi_hwmod,
2334 .slave = &omap54xx_emif1_hwmod,
2342 .slave = &omap54xx_emif2_hwmod,
2350 .slave = &omap54xx_gpio1_hwmod,
2358 .slave = &omap54xx_gpio2_hwmod,
2366 .slave = &omap54xx_gpio3_hwmod,
2374 .slave = &omap54xx_gpio4_hwmod,
2382 .slave = &omap54xx_gpio5_hwmod,
2390 .slave = &omap54xx_gpio6_hwmod,
2398 .slave = &omap54xx_gpio7_hwmod,
2406 .slave = &omap54xx_gpio8_hwmod,
2414 .slave = &omap54xx_i2c1_hwmod,
2422 .slave = &omap54xx_i2c2_hwmod,
2430 .slave = &omap54xx_i2c3_hwmod,
2438 .slave = &omap54xx_i2c4_hwmod,
2446 .slave = &omap54xx_i2c5_hwmod,
2454 .slave = &omap54xx_kbd_hwmod,
2462 .slave = &omap54xx_mailbox_hwmod,
2470 .slave = &omap54xx_mcbsp1_hwmod,
2478 .slave = &omap54xx_mcbsp2_hwmod,
2486 .slave = &omap54xx_mcbsp3_hwmod,
2494 .slave = &omap54xx_mcpdm_hwmod,
2502 .slave = &omap54xx_mcspi1_hwmod,
2510 .slave = &omap54xx_mcspi2_hwmod,
2518 .slave = &omap54xx_mcspi3_hwmod,
2526 .slave = &omap54xx_mcspi4_hwmod,
2534 .slave = &omap54xx_mmc1_hwmod,
2542 .slave = &omap54xx_mmc2_hwmod,
2550 .slave = &omap54xx_mmc3_hwmod,
2558 .slave = &omap54xx_mmc4_hwmod,
2566 .slave = &omap54xx_mmc5_hwmod,
2574 .slave = &omap54xx_mpu_hwmod,
2582 .slave = &omap54xx_spinlock_hwmod,
2590 .slave = &omap54xx_ocp2scp1_hwmod,
2598 .slave = &omap54xx_timer1_hwmod,
2606 .slave = &omap54xx_timer2_hwmod,
2614 .slave = &omap54xx_timer3_hwmod,
2622 .slave = &omap54xx_timer4_hwmod,
2630 .slave = &omap54xx_timer5_hwmod,
2638 .slave = &omap54xx_timer6_hwmod,
2646 .slave = &omap54xx_timer7_hwmod,
2654 .slave = &omap54xx_timer8_hwmod,
2662 .slave = &omap54xx_timer9_hwmod,
2670 .slave = &omap54xx_timer10_hwmod,
2678 .slave = &omap54xx_timer11_hwmod,
2686 .slave = &omap54xx_uart1_hwmod,
2694 .slave = &omap54xx_uart2_hwmod,
2702 .slave = &omap54xx_uart3_hwmod,
2710 .slave = &omap54xx_uart4_hwmod,
2718 .slave = &omap54xx_uart5_hwmod,
2726 .slave = &omap54xx_uart6_hwmod,
2734 .slave = &omap54xx_usb_host_hs_hwmod,
2742 .slave = &omap54xx_usb_tll_hs_hwmod,
2750 .slave = &omap54xx_usb_otg_ss_hwmod,
2758 .slave = &omap54xx_wd_timer2_hwmod,
H A Domap_hwmod_7xx_data.c2327 .slave = &dra7xx_l3_instr_hwmod,
2335 .slave = &dra7xx_l3_main_1_hwmod,
2343 .slave = &dra7xx_l3_main_1_hwmod,
2351 .slave = &dra7xx_l3_main_2_hwmod,
2359 .slave = &dra7xx_l3_main_2_hwmod,
2367 .slave = &dra7xx_l4_cfg_hwmod,
2375 .slave = &dra7xx_l4_per1_hwmod,
2383 .slave = &dra7xx_l4_per2_hwmod,
2391 .slave = &dra7xx_l4_per3_hwmod,
2399 .slave = &dra7xx_l4_wkup_hwmod,
2407 .slave = &dra7xx_atl_hwmod,
2415 .slave = &dra7xx_bb2d_hwmod,
2423 .slave = &dra7xx_counter_32k_hwmod,
2431 .slave = &dra7xx_ctrl_module_wkup_hwmod,
2438 .slave = &dra7xx_gmac_hwmod,
2445 .slave = &dra7xx_mdio_hwmod,
2452 .slave = &dra7xx_dcan1_hwmod,
2460 .slave = &dra7xx_dcan2_hwmod,
2477 .slave = &dra7xx_dma_system_hwmod,
2495 .slave = &dra7xx_dss_hwmod,
2513 .slave = &dra7xx_dss_dispc_hwmod,
2532 .slave = &dra7xx_dss_hdmi_hwmod,
2550 .slave = &dra7xx_elm_hwmod,
2559 .slave = &dra7xx_gpio1_hwmod,
2567 .slave = &dra7xx_gpio2_hwmod,
2575 .slave = &dra7xx_gpio3_hwmod,
2583 .slave = &dra7xx_gpio4_hwmod,
2591 .slave = &dra7xx_gpio5_hwmod,
2599 .slave = &dra7xx_gpio6_hwmod,
2607 .slave = &dra7xx_gpio7_hwmod,
2615 .slave = &dra7xx_gpio8_hwmod,
2632 .slave = &dra7xx_gpmc_hwmod,
2650 .slave = &dra7xx_hdq1w_hwmod,
2659 .slave = &dra7xx_i2c1_hwmod,
2667 .slave = &dra7xx_i2c2_hwmod,
2675 .slave = &dra7xx_i2c3_hwmod,
2683 .slave = &dra7xx_i2c4_hwmod,
2691 .slave = &dra7xx_i2c5_hwmod,
2699 .slave = &dra7xx_mailbox1_hwmod,
2707 .slave = &dra7xx_mailbox2_hwmod,
2715 .slave = &dra7xx_mailbox3_hwmod,
2723 .slave = &dra7xx_mailbox4_hwmod,
2731 .slave = &dra7xx_mailbox5_hwmod,
2739 .slave = &dra7xx_mailbox6_hwmod,
2747 .slave = &dra7xx_mailbox7_hwmod,
2755 .slave = &dra7xx_mailbox8_hwmod,
2763 .slave = &dra7xx_mailbox9_hwmod,
2771 .slave = &dra7xx_mailbox10_hwmod,
2779 .slave = &dra7xx_mailbox11_hwmod,
2787 .slave = &dra7xx_mailbox12_hwmod,
2795 .slave = &dra7xx_mailbox13_hwmod,
2803 .slave = &dra7xx_mcspi1_hwmod,
2811 .slave = &dra7xx_mcspi2_hwmod,
2819 .slave = &dra7xx_mcspi3_hwmod,
2827 .slave = &dra7xx_mcspi4_hwmod,
2835 .slave = &dra7xx_mmc1_hwmod,
2843 .slave = &dra7xx_mmc2_hwmod,
2851 .slave = &dra7xx_mmc3_hwmod,
2859 .slave = &dra7xx_mmc4_hwmod,
2867 .slave = &dra7xx_mpu_hwmod,
2875 .slave = &dra7xx_ocp2scp1_hwmod,
2883 .slave = &dra7xx_ocp2scp3_hwmod,
2891 .slave = &dra7xx_pciess1_hwmod,
2899 .slave = &dra7xx_pciess1_hwmod,
2907 .slave = &dra7xx_pciess2_hwmod,
2915 .slave = &dra7xx_pciess2_hwmod,
2932 .slave = &dra7xx_qspi_hwmod,
2941 .slave = &dra7xx_rtcss_hwmod,
2959 .slave = &dra7xx_sata_hwmod,
2977 .slave = &dra7xx_smartreflex_core_hwmod,
2995 .slave = &dra7xx_smartreflex_mpu_hwmod,
3013 .slave = &dra7xx_spinlock_hwmod,
3022 .slave = &dra7xx_timer1_hwmod,
3030 .slave = &dra7xx_timer2_hwmod,
3038 .slave = &dra7xx_timer3_hwmod,
3046 .slave = &dra7xx_timer4_hwmod,
3054 .slave = &dra7xx_timer5_hwmod,
3062 .slave = &dra7xx_timer6_hwmod,
3070 .slave = &dra7xx_timer7_hwmod,
3078 .slave = &dra7xx_timer8_hwmod,
3086 .slave = &dra7xx_timer9_hwmod,
3094 .slave = &dra7xx_timer10_hwmod,
3102 .slave = &dra7xx_timer11_hwmod,
3110 .slave = &dra7xx_timer13_hwmod,
3118 .slave = &dra7xx_timer14_hwmod,
3126 .slave = &dra7xx_timer15_hwmod,
3134 .slave = &dra7xx_timer16_hwmod,
3142 .slave = &dra7xx_uart1_hwmod,
3150 .slave = &dra7xx_uart2_hwmod,
3158 .slave = &dra7xx_uart3_hwmod,
3166 .slave = &dra7xx_uart4_hwmod,
3174 .slave = &dra7xx_uart5_hwmod,
3182 .slave = &dra7xx_uart6_hwmod,
3190 .slave = &dra7xx_uart7_hwmod,
3198 .slave = &dra7xx_uart8_hwmod,
3206 .slave = &dra7xx_uart9_hwmod,
3214 .slave = &dra7xx_uart10_hwmod,
3222 .slave = &dra7xx_usb_otg_ss1_hwmod,
3230 .slave = &dra7xx_usb_otg_ss2_hwmod,
3238 .slave = &dra7xx_usb_otg_ss3_hwmod,
3246 .slave = &dra7xx_usb_otg_ss4_hwmod,
3254 .slave = &dra7xx_vcp1_hwmod,
3262 .slave = &dra7xx_vcp1_hwmod,
3270 .slave = &dra7xx_vcp2_hwmod,
3278 .slave = &dra7xx_vcp2_hwmod,
3286 .slave = &dra7xx_wd_timer2_hwmod,
H A Domap_hwmod_33xx_data.c347 .slave = &am33xx_emif_hwmod,
356 .slave = &am33xx_l4_hs_hwmod,
364 .slave = &am33xx_l4_wkup_hwmod,
372 .slave = &am33xx_wkup_m3_hwmod,
380 .slave = &am33xx_pruss_hwmod,
397 .slave = &am33xx_debugss_hwmod,
406 .slave = &am33xx_smartreflex0_hwmod,
414 .slave = &am33xx_smartreflex1_hwmod,
422 .slave = &am33xx_control_hwmod,
430 .slave = &am33xx_i2c1_hwmod,
438 .slave = &am33xx_gpio0_hwmod,
455 .slave = &am33xx_adc_tsc_hwmod,
463 .slave = &am33xx_cpgmac0_hwmod,
479 .slave = &am33xx_lcdc_hwmod,
488 .slave = &am33xx_timer1_hwmod,
496 .slave = &am33xx_uart1_hwmod,
504 .slave = &am33xx_wd_timer1_hwmod,
513 .slave = &am33xx_usbss_hwmod,
549 .slave = &am33xx_rng_hwmod,
H A Domap_hwmod_81xx_data.c143 .slave = &dm816x_l4_ls_hwmod,
150 .slave = &dm816x_l4_hs_hwmod,
171 .slave = &dm816x_alwon_l3_slow_hwmod,
178 .slave = &dm816x_alwon_l3_med_hwmod,
216 .slave = &dm816x_uart1_hwmod,
237 .slave = &dm816x_uart2_hwmod,
258 .slave = &dm816x_uart3_hwmod,
295 .slave = &dm816x_wd_timer_hwmod,
332 .slave = &dm81xx_i2c1_hwmod,
363 .slave = &dm816x_i2c2_hwmod,
382 .slave = &dm81xx_elm_hwmod,
431 .slave = &dm81xx_gpio1_hwmod,
457 .slave = &dm81xx_gpio2_hwmod,
491 .slave = &dm81xx_gpmc_hwmod,
524 .slave = &dm81xx_usbss_hwmod,
564 .slave = &dm816x_timer1_hwmod,
585 .slave = &dm816x_timer2_hwmod,
606 .slave = &dm816x_timer3_hwmod,
627 .slave = &dm816x_timer4_hwmod,
648 .slave = &dm816x_timer5_hwmod,
669 .slave = &dm816x_timer6_hwmod,
690 .slave = &dm816x_timer7_hwmod,
720 .slave = &dm816x_emac0_hwmod,
750 .slave = &dm816x_emac0_mdio_hwmod,
770 .slave = &dm816x_emac1_hwmod,
817 .slave = &dm816x_mmc1_hwmod,
860 .slave = &dm816x_mcspi1_hwmod,
895 .slave = &dm816x_mailbox_hwmod,
918 .slave = &dm816x_tpcc_hwmod,
951 .slave = &dm816x_tptc0_hwmod,
959 .slave = &dm816x_alwon_l3_fast_hwmod,
993 .slave = &dm816x_tptc1_hwmod,
1001 .slave = &dm816x_alwon_l3_fast_hwmod,
1035 .slave = &dm816x_tptc2_hwmod,
1043 .slave = &dm816x_alwon_l3_fast_hwmod,
1077 .slave = &dm816x_tptc3_hwmod,
1085 .slave = &dm816x_alwon_l3_fast_hwmod,
H A Domap_hwmod_44xx_data.c1795 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2119 .slave = &omap44xx_mmu_ipu_hwmod,
2166 .slave = &omap44xx_mmu_dsp_hwmod,
3156 .slave = &omap44xx_dmm_hwmod,
3164 .slave = &omap44xx_dmm_hwmod,
3172 .slave = &omap44xx_l3_instr_hwmod,
3180 .slave = &omap44xx_l3_instr_hwmod,
3188 .slave = &omap44xx_l3_instr_hwmod,
3196 .slave = &omap44xx_l3_main_1_hwmod,
3204 .slave = &omap44xx_l3_main_1_hwmod,
3212 .slave = &omap44xx_l3_main_1_hwmod,
3220 .slave = &omap44xx_l3_main_1_hwmod,
3228 .slave = &omap44xx_l3_main_1_hwmod,
3236 .slave = &omap44xx_l3_main_1_hwmod,
3244 .slave = &omap44xx_l3_main_1_hwmod,
3252 .slave = &omap44xx_l3_main_2_hwmod,
3260 .slave = &omap44xx_l3_main_2_hwmod,
3268 .slave = &omap44xx_l3_main_2_hwmod,
3276 .slave = &omap44xx_l3_main_2_hwmod,
3284 .slave = &omap44xx_l3_main_2_hwmod,
3292 .slave = &omap44xx_l3_main_2_hwmod,
3300 .slave = &omap44xx_l3_main_2_hwmod,
3308 .slave = &omap44xx_l3_main_2_hwmod,
3316 .slave = &omap44xx_l3_main_2_hwmod,
3324 .slave = &omap44xx_l3_main_2_hwmod,
3332 .slave = &omap44xx_l3_main_2_hwmod,
3340 .slave = &omap44xx_l3_main_2_hwmod,
3348 .slave = &omap44xx_l3_main_2_hwmod,
3356 .slave = &omap44xx_l3_main_3_hwmod,
3364 .slave = &omap44xx_l3_main_3_hwmod,
3372 .slave = &omap44xx_l3_main_3_hwmod,
3380 .slave = &omap44xx_l4_abe_hwmod,
3388 .slave = &omap44xx_l4_abe_hwmod,
3396 .slave = &omap44xx_l4_abe_hwmod,
3404 .slave = &omap44xx_l4_abe_hwmod,
3412 .slave = &omap44xx_l4_cfg_hwmod,
3420 .slave = &omap44xx_l4_per_hwmod,
3428 .slave = &omap44xx_l4_wkup_hwmod,
3436 .slave = &omap44xx_mpu_private_hwmod,
3444 .slave = &omap44xx_ocp_wp_noc_hwmod,
3482 .slave = &omap44xx_aess_hwmod,
3521 .slave = &omap44xx_aess_hwmod,
3530 .slave = &omap44xx_c2c_hwmod,
3538 .slave = &omap44xx_counter_32k_hwmod,
3555 .slave = &omap44xx_ctrl_module_core_hwmod,
3573 .slave = &omap44xx_ctrl_module_pad_core_hwmod,
3591 .slave = &omap44xx_ctrl_module_wkup_hwmod,
3609 .slave = &omap44xx_ctrl_module_pad_wkup_hwmod,
3618 .slave = &omap44xx_debugss_hwmod,
3635 .slave = &omap44xx_dma_system_hwmod,
3644 .slave = &omap44xx_dmic_hwmod,
3652 .slave = &omap44xx_iva_hwmod,
3660 .slave = &omap44xx_sl2if_hwmod,
3668 .slave = &omap44xx_dsp_hwmod,
3685 .slave = &omap44xx_dss_hwmod,
3703 .slave = &omap44xx_dss_hwmod,
3721 .slave = &omap44xx_dss_dispc_hwmod,
3739 .slave = &omap44xx_dss_dispc_hwmod,
3757 .slave = &omap44xx_dss_dsi1_hwmod,
3775 .slave = &omap44xx_dss_dsi1_hwmod,
3793 .slave = &omap44xx_dss_dsi2_hwmod,
3811 .slave = &omap44xx_dss_dsi2_hwmod,
3829 .slave = &omap44xx_dss_hdmi_hwmod,
3847 .slave = &omap44xx_dss_hdmi_hwmod,
3865 .slave = &omap44xx_dss_rfbi_hwmod,
3883 .slave = &omap44xx_dss_rfbi_hwmod,
3901 .slave = &omap44xx_dss_venc_hwmod,
3919 .slave = &omap44xx_dss_venc_hwmod,
3937 .slave = &omap44xx_elm_hwmod,
3955 .slave = &omap44xx_fdif_hwmod,
3964 .slave = &omap44xx_gpio1_hwmod,
3972 .slave = &omap44xx_gpio2_hwmod,
3980 .slave = &omap44xx_gpio3_hwmod,
3988 .slave = &omap44xx_gpio4_hwmod,
3996 .slave = &omap44xx_gpio5_hwmod,
4004 .slave = &omap44xx_gpio6_hwmod,
4012 .slave = &omap44xx_gpmc_hwmod,
4029 .slave = &omap44xx_gpu_hwmod,
4047 .slave = &omap44xx_hdq1w_hwmod,
4065 .slave = &omap44xx_hsi_hwmod,
4074 .slave = &omap44xx_i2c1_hwmod,
4082 .slave = &omap44xx_i2c2_hwmod,
4090 .slave = &omap44xx_i2c3_hwmod,
4098 .slave = &omap44xx_i2c4_hwmod,
4106 .slave = &omap44xx_ipu_hwmod,
4123 .slave = &omap44xx_iss_hwmod,
4132 .slave = &omap44xx_sl2if_hwmod,
4140 .slave = &omap44xx_iva_hwmod,
4148 .slave = &omap44xx_kbd_hwmod,
4156 .slave = &omap44xx_mailbox_hwmod,
4173 .slave = &omap44xx_mcasp_hwmod,
4191 .slave = &omap44xx_mcasp_hwmod,
4200 .slave = &omap44xx_mcbsp1_hwmod,
4208 .slave = &omap44xx_mcbsp2_hwmod,
4216 .slave = &omap44xx_mcbsp3_hwmod,
4224 .slave = &omap44xx_mcbsp4_hwmod,
4232 .slave = &omap44xx_mcpdm_hwmod,
4240 .slave = &omap44xx_mcspi1_hwmod,
4248 .slave = &omap44xx_mcspi2_hwmod,
4256 .slave = &omap44xx_mcspi3_hwmod,
4264 .slave = &omap44xx_mcspi4_hwmod,
4272 .slave = &omap44xx_mmc1_hwmod,
4280 .slave = &omap44xx_mmc2_hwmod,
4288 .slave = &omap44xx_mmc3_hwmod,
4296 .slave = &omap44xx_mmc4_hwmod,
4304 .slave = &omap44xx_mmc5_hwmod,
4312 .slave = &omap44xx_ocmc_ram_hwmod,
4320 .slave = &omap44xx_ocp2scp_usb_phy_hwmod,
4328 .slave = &omap44xx_prcm_mpu_hwmod,
4336 .slave = &omap44xx_cm_core_aon_hwmod,
4344 .slave = &omap44xx_cm_core_hwmod,
4352 .slave = &omap44xx_prm_hwmod,
4360 .slave = &omap44xx_scrm_hwmod,
4368 .slave = &omap44xx_sl2if_hwmod,
4385 .slave = &omap44xx_slimbus1_hwmod,
4403 .slave = &omap44xx_slimbus1_hwmod,
4421 .slave = &omap44xx_slimbus2_hwmod,
4439 .slave = &omap44xx_smartreflex_core_hwmod,
4457 .slave = &omap44xx_smartreflex_iva_hwmod,
4475 .slave = &omap44xx_smartreflex_mpu_hwmod,
4493 .slave = &omap44xx_spinlock_hwmod,
4502 .slave = &omap44xx_timer1_hwmod,
4510 .slave = &omap44xx_timer2_hwmod,
4518 .slave = &omap44xx_timer3_hwmod,
4526 .slave = &omap44xx_timer4_hwmod,
4534 .slave = &omap44xx_timer5_hwmod,
4542 .slave = &omap44xx_timer6_hwmod,
4550 .slave = &omap44xx_timer7_hwmod,
4558 .slave = &omap44xx_timer8_hwmod,
4566 .slave = &omap44xx_timer9_hwmod,
4574 .slave = &omap44xx_timer10_hwmod,
4582 .slave = &omap44xx_timer11_hwmod,
4590 .slave = &omap44xx_uart1_hwmod,
4598 .slave = &omap44xx_uart2_hwmod,
4606 .slave = &omap44xx_uart3_hwmod,
4614 .slave = &omap44xx_uart4_hwmod,
4622 .slave = &omap44xx_usb_host_fs_hwmod,
4630 .slave = &omap44xx_usb_host_hs_hwmod,
4638 .slave = &omap44xx_usb_otg_hs_hwmod,
4646 .slave = &omap44xx_usb_tll_hs_hwmod,
4654 .slave = &omap44xx_wd_timer2_hwmod,
4671 .slave = &omap44xx_wd_timer3_hwmod,
4689 .slave = &omap44xx_wd_timer3_hwmod,
4698 .slave = &omap44xx_emif1_hwmod,
4706 .slave = &omap44xx_emif2_hwmod,
H A Domap_hwmod_3xxx_data.c1544 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2191 .slave = &omap3xxx_l4_core_hwmod,
2198 .slave = &omap3xxx_l4_per_hwmod,
2214 .slave = &omap3xxx_l3_main_hwmod,
2231 .slave = &omap3xxx_debugss_hwmod,
2239 .slave = &omap3xxx_l3_main_hwmod,
2245 .slave = &omap3xxx_l3_main_hwmod,
2258 .slave = &omap3xxx_l3_main_hwmod,
2266 .slave = &omap3xxx_l3_main_hwmod,
2274 .slave = &omap3xxx_l3_main_hwmod,
2282 .slave = &omap3xxx_l4_wkup_hwmod,
2289 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2298 .slave = &omap3xxx_es3plus_mmc1_hwmod,
2308 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2317 .slave = &omap3xxx_es3plus_mmc2_hwmod,
2336 .slave = &omap3xxx_mmc3_hwmod,
2355 .slave = &omap3xxx_uart1_hwmod,
2373 .slave = &omap3xxx_uart2_hwmod,
2391 .slave = &omap3xxx_uart3_hwmod,
2409 .slave = &omap36xx_uart4_hwmod,
2427 .slave = &am35xx_uart4_hwmod,
2436 .slave = &omap3xxx_i2c1_hwmod,
2452 .slave = &omap3xxx_i2c2_hwmod,
2477 .slave = &omap3xxx_i2c3_hwmod,
2502 .slave = &omap34xx_sr1_hwmod,
2510 .slave = &omap36xx_sr1_hwmod,
2528 .slave = &omap34xx_sr2_hwmod,
2536 .slave = &omap36xx_sr2_hwmod,
2554 .slave = &omap3xxx_usbhsotg_hwmod,
2572 .slave = &am35xx_usbhsotg_hwmod,
2581 .slave = &omap3xxx_l4_sec_hwmod,
2588 .slave = &omap3xxx_iva_hwmod,
2605 .slave = &omap3xxx_timer1_hwmod,
2623 .slave = &omap3xxx_timer2_hwmod,
2641 .slave = &omap3xxx_timer3_hwmod,
2659 .slave = &omap3xxx_timer4_hwmod,
2677 .slave = &omap3xxx_timer5_hwmod,
2695 .slave = &omap3xxx_timer6_hwmod,
2713 .slave = &omap3xxx_timer7_hwmod,
2731 .slave = &omap3xxx_timer8_hwmod,
2749 .slave = &omap3xxx_timer9_hwmod,
2758 .slave = &omap3xxx_timer10_hwmod,
2767 .slave = &omap3xxx_timer11_hwmod,
2785 .slave = &omap3xxx_timer12_hwmod,
2803 .slave = &omap3xxx_wd_timer2_hwmod,
2812 .slave = &omap3430es1_dss_core_hwmod,
2827 .slave = &omap3xxx_dss_core_hwmod,
2843 .slave = &omap3xxx_dss_dispc_hwmod,
2868 .slave = &omap3xxx_dss_dsi1_hwmod,
2884 .slave = &omap3xxx_dss_rfbi_hwmod,
2900 .slave = &omap3xxx_dss_venc_hwmod,
2926 .slave = &omap3xxx_gpio1_hwmod,
2943 .slave = &omap3xxx_gpio2_hwmod,
2960 .slave = &omap3xxx_gpio3_hwmod,
3010 .slave = &omap3xxx_mmu_isp_hwmod,
3052 .slave = &omap3xxx_mmu_iva_hwmod,
3089 .slave = &omap3xxx_gpio4_hwmod,
3106 .slave = &omap3xxx_gpio5_hwmod,
3123 .slave = &omap3xxx_gpio6_hwmod,
3131 .slave = &omap3xxx_l3_main_hwmod,
3148 .slave = &omap3xxx_dma_system_hwmod,
3167 .slave = &omap3xxx_mcbsp1_hwmod,
3186 .slave = &omap3xxx_mcbsp2_hwmod,
3205 .slave = &omap3xxx_mcbsp3_hwmod,
3224 .slave = &omap3xxx_mcbsp4_hwmod,
3243 .slave = &omap3xxx_mcbsp5_hwmod,
3262 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
3281 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
3299 .slave = &omap3xxx_mailbox_hwmod,
3307 .slave = &omap34xx_mcspi1,
3316 .slave = &omap34xx_mcspi2,
3325 .slave = &omap34xx_mcspi3,
3343 .slave = &omap34xx_mcspi4,
3351 .slave = &omap3xxx_l3_main_hwmod,
3378 .slave = &omap3xxx_usb_host_hs_hwmod,
3396 .slave = &omap3xxx_usb_tll_hs_hwmod,
3405 .slave = &omap3xxx_hdq1w_hwmod,
3433 .slave = &omap3xxx_counter_32k_hwmod,
3457 .slave = &omap3xxx_l3_main_hwmod,
3470 .slave = &am35xx_mdio_hwmod,
3498 .slave = &omap3xxx_l3_main_hwmod,
3511 .slave = &am35xx_emac_hwmod,
3518 .slave = &omap3xxx_gpmc_hwmod,
3583 .slave = &omap3xxx_sham_hwmod,
3644 .slave = &omap3xxx_aes_hwmod,
3689 .slave = &omap34xx_ssi_hwmod,
H A Dvc.h67 * @i2c_slave_addr: I2C slave address of PMIC for this VC channel
75 * @smps_sa_mask: i2c slave address bitmask in the PRM_VC_SMPS_SA register
83 * @cfg_channel_sa_shift: bit shift for slave address cfg_channel register
/linux-4.1.27/arch/cris/include/asm/
H A Detraxi2c.h13 * slave, register and value.
16 #define I2C_WRITEARG(slave, reg, value) (((slave) << 16) | ((reg) << 8) | (value))
17 #define I2C_READARG(slave, reg) (((slave) << 16) | ((reg) << 8))
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
H A Dresource_tracker.c295 static void rem_slave_vlans(struct mlx4_dev *dev, int slave); mlx4_grant_resource()
296 static inline int mlx4_grant_resource(struct mlx4_dev *dev, int slave, mlx4_grant_resource() argument
307 if (slave > dev->persist->num_vfs) mlx4_grant_resource()
313 (dev->persist->num_vfs + 1) + slave] : mlx4_grant_resource()
314 res_alloc->allocated[slave]; mlx4_grant_resource()
319 guaranteed = res_alloc->guaranteed[slave]; mlx4_grant_resource()
321 if (allocated + count > res_alloc->quota[slave]) { mlx4_grant_resource()
323 slave, port, resource_str(res_type), count, mlx4_grant_resource()
324 allocated, res_alloc->quota[slave]); mlx4_grant_resource()
344 slave, port, resource_str(res_type), free, mlx4_grant_resource()
352 (dev->persist->num_vfs + 1) + slave] += count; mlx4_grant_resource()
356 res_alloc->allocated[slave] += count; mlx4_grant_resource()
367 static inline void mlx4_release_resource(struct mlx4_dev *dev, int slave, mlx4_release_resource() argument
376 if (slave > dev->persist->num_vfs) mlx4_release_resource()
383 (dev->persist->num_vfs + 1) + slave] : mlx4_release_resource()
384 res_alloc->allocated[slave]; mlx4_release_resource()
385 guaranteed = res_alloc->guaranteed[slave]; mlx4_release_resource()
399 (dev->persist->num_vfs + 1) + slave] -= count; mlx4_release_resource()
403 res_alloc->allocated[slave] -= count; mlx4_release_resource()
648 static void update_pkey_index(struct mlx4_dev *dev, int slave, update_pkey_index() argument
659 new_index = priv->virt2phys_pkey[slave][port - 1][orig_index]; update_pkey_index()
664 u8 slave) update_gid()
675 mlx4_get_base_gid_ix(dev, slave, port) | 0x80; update_gid()
677 qp_ctx->pri_path.mgid_index = slave | 0x80; update_gid()
684 mlx4_get_base_gid_ix(dev, slave, port); update_gid()
687 qp_ctx->pri_path.mgid_index = slave & 0x7F; update_gid()
694 mlx4_get_base_gid_ix(dev, slave, port); update_gid()
697 qp_ctx->alt_path.mgid_index = slave & 0x7F; update_gid()
705 u8 slave, u32 qpn) update_vport_qp_param()
715 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; update_vport_qp_param()
792 static int get_res(struct mlx4_dev *dev, int slave, u64 res_id, get_res() argument
811 if (r->owner != slave) { get_res()
829 u64 res_id, int *slave) mlx4_get_slave_from_resource_id()
842 *slave = r->owner; mlx4_get_slave_from_resource_id()
850 static void put_res(struct mlx4_dev *dev, int slave, u64 res_id, put_res() argument
997 static struct res_common *alloc_tr(u64 id, enum mlx4_resource type, int slave, alloc_tr() argument
1037 ret->owner = slave; alloc_tr()
1042 static int add_res_range(struct mlx4_dev *dev, int slave, u64 base, int count, add_res_range() argument
1057 res_arr[i] = alloc_tr(base + i, type, slave, extra); add_res_range()
1077 &tracker->slave_list[slave].res_list[type]); add_res_range()
1227 static int rem_res_range(struct mlx4_dev *dev, int slave, u64 base, int count, rem_res_range() argument
1243 if (r->owner != slave) { rem_res_range()
1266 static int qp_res_start_move_to(struct mlx4_dev *dev, int slave, int qpn, qp_res_start_move_to() argument
1279 else if (r->com.owner != slave) qp_res_start_move_to()
1331 static int mr_res_start_move_to(struct mlx4_dev *dev, int slave, int index, mr_res_start_move_to() argument
1343 else if (r->com.owner != slave) mr_res_start_move_to()
1384 static int eq_res_start_move_to(struct mlx4_dev *dev, int slave, int index, eq_res_start_move_to() argument
1396 else if (r->com.owner != slave) eq_res_start_move_to()
1432 static int cq_res_start_move_to(struct mlx4_dev *dev, int slave, int cqn, cq_res_start_move_to() argument
1444 } else if (r->com.owner != slave) { cq_res_start_move_to()
1472 static int srq_res_start_move_to(struct mlx4_dev *dev, int slave, int index, srq_res_start_move_to() argument
1484 } else if (r->com.owner != slave) { srq_res_start_move_to()
1508 static void res_abort_move(struct mlx4_dev *dev, int slave, res_abort_move() argument
1517 if (r && (r->owner == slave)) res_abort_move()
1522 static void res_end_move(struct mlx4_dev *dev, int slave, res_end_move() argument
1531 if (r && (r->owner == slave)) res_end_move()
1536 static int valid_reserved(struct mlx4_dev *dev, int slave, int qpn) valid_reserved() argument
1539 (mlx4_is_master(dev) || mlx4_is_guest_proxy(dev, slave, qpn)); valid_reserved()
1547 static int qp_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, qp_alloc_res() argument
1561 * slave tries to set. qp_alloc_res()
1565 err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); qp_alloc_res()
1571 mlx4_release_resource(dev, slave, RES_QP, count, 0); qp_alloc_res()
1575 err = add_res_range(dev, slave, base, count, RES_QP, 0); qp_alloc_res()
1577 mlx4_release_resource(dev, slave, RES_QP, count, 0); qp_alloc_res()
1585 if (valid_reserved(dev, slave, qpn)) { qp_alloc_res()
1586 err = add_res_range(dev, slave, qpn, 1, RES_QP, 0); qp_alloc_res()
1591 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_MAPPED, qp_alloc_res()
1599 res_abort_move(dev, slave, RES_QP, qpn); qp_alloc_res()
1604 res_end_move(dev, slave, RES_QP, qpn); qp_alloc_res()
1614 static int mtt_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, mtt_alloc_res() argument
1626 err = mlx4_grant_resource(dev, slave, RES_MTT, 1 << order, 0); mtt_alloc_res()
1632 mlx4_release_resource(dev, slave, RES_MTT, 1 << order, 0); mtt_alloc_res()
1636 err = add_res_range(dev, slave, base, 1, RES_MTT, order); mtt_alloc_res()
1638 mlx4_release_resource(dev, slave, RES_MTT, 1 << order, 0); mtt_alloc_res()
1647 static int mpt_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, mpt_alloc_res() argument
1657 err = mlx4_grant_resource(dev, slave, RES_MPT, 1, 0); mpt_alloc_res()
1663 mlx4_release_resource(dev, slave, RES_MPT, 1, 0); mpt_alloc_res()
1668 err = add_res_range(dev, slave, id, 1, RES_MPT, index); mpt_alloc_res()
1670 mlx4_release_resource(dev, slave, RES_MPT, 1, 0); mpt_alloc_res()
1679 err = mr_res_start_move_to(dev, slave, id, mpt_alloc_res()
1686 res_abort_move(dev, slave, RES_MPT, id); mpt_alloc_res()
1690 res_end_move(dev, slave, RES_MPT, id); mpt_alloc_res()
1696 static int cq_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, cq_alloc_res() argument
1704 err = mlx4_grant_resource(dev, slave, RES_CQ, 1, 0); cq_alloc_res()
1710 mlx4_release_resource(dev, slave, RES_CQ, 1, 0); cq_alloc_res()
1714 err = add_res_range(dev, slave, cqn, 1, RES_CQ, 0); cq_alloc_res()
1716 mlx4_release_resource(dev, slave, RES_CQ, 1, 0); cq_alloc_res()
1731 static int srq_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, srq_alloc_res() argument
1739 err = mlx4_grant_resource(dev, slave, RES_SRQ, 1, 0); srq_alloc_res()
1745 mlx4_release_resource(dev, slave, RES_SRQ, 1, 0); srq_alloc_res()
1749 err = add_res_range(dev, slave, srqn, 1, RES_SRQ, 0); srq_alloc_res()
1751 mlx4_release_resource(dev, slave, RES_SRQ, 1, 0); srq_alloc_res()
1766 static int mac_find_smac_ix_in_slave(struct mlx4_dev *dev, int slave, int port, mac_find_smac_ix_in_slave() argument
1772 &tracker->slave_list[slave].res_list[RES_MAC]; mac_find_smac_ix_in_slave()
1784 static int mac_add_to_slave(struct mlx4_dev *dev, int slave, u64 mac, int port, u8 smac_index) mac_add_to_slave() argument
1789 &tracker->slave_list[slave].res_list[RES_MAC]; mac_add_to_slave()
1800 if (mlx4_grant_resource(dev, slave, RES_MAC, 1, port))
1804 mlx4_release_resource(dev, slave, RES_MAC, 1, port);
1812 &tracker->slave_list[slave].res_list[RES_MAC]);
1816 static void mac_del_from_slave(struct mlx4_dev *dev, int slave, u64 mac, mac_del_from_slave() argument
1822 &tracker->slave_list[slave].res_list[RES_MAC]; mac_del_from_slave()
1829 mlx4_release_resource(dev, slave, RES_MAC, 1, port); list_for_each_entry_safe()
1837 static void rem_slave_macs(struct mlx4_dev *dev, int slave) rem_slave_macs() argument
1842 &tracker->slave_list[slave].res_list[RES_MAC]; rem_slave_macs()
1848 /* dereference the mac the num times the slave referenced it */ list_for_each_entry_safe()
1851 mlx4_release_resource(dev, slave, RES_MAC, 1, res->port); list_for_each_entry_safe()
1856 static int mac_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, mac_alloc_res() argument
1869 dev, slave, port); mac_alloc_res()
1883 err = mac_add_to_slave(dev, slave, mac, port, smac_index); mac_alloc_res()
1890 static int vlan_add_to_slave(struct mlx4_dev *dev, int slave, u16 vlan, vlan_add_to_slave() argument
1896 &tracker->slave_list[slave].res_list[RES_VLAN]; vlan_add_to_slave()
1907 if (mlx4_grant_resource(dev, slave, RES_VLAN, 1, port))
1911 mlx4_release_resource(dev, slave, RES_VLAN, 1, port);
1919 &tracker->slave_list[slave].res_list[RES_VLAN]);
1924 static void vlan_del_from_slave(struct mlx4_dev *dev, int slave, u16 vlan, vlan_del_from_slave() argument
1930 &tracker->slave_list[slave].res_list[RES_VLAN]; vlan_del_from_slave()
1937 mlx4_release_resource(dev, slave, RES_VLAN, list_for_each_entry_safe()
1946 static void rem_slave_vlans(struct mlx4_dev *dev, int slave) rem_slave_vlans() argument
1951 &tracker->slave_list[slave].res_list[RES_VLAN]; rem_slave_vlans()
1957 /* dereference the vlan the num times the slave referenced it */ list_for_each_entry_safe()
1960 mlx4_release_resource(dev, slave, RES_VLAN, 1, res->port); list_for_each_entry_safe()
1965 static int vlan_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, vlan_alloc_res() argument
1981 dev, slave, port); vlan_alloc_res()
1987 slave_state[slave].old_vlan_api = true; vlan_alloc_res()
1996 err = vlan_add_to_slave(dev, slave, vlan, port, vlan_index); vlan_alloc_res()
2003 static int counter_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, counter_alloc_res() argument
2012 err = mlx4_grant_resource(dev, slave, RES_COUNTER, 1, 0); counter_alloc_res()
2018 mlx4_release_resource(dev, slave, RES_COUNTER, 1, 0); counter_alloc_res()
2022 err = add_res_range(dev, slave, index, 1, RES_COUNTER, 0); counter_alloc_res()
2025 mlx4_release_resource(dev, slave, RES_COUNTER, 1, 0); counter_alloc_res()
2033 static int xrcdn_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, xrcdn_alloc_res() argument
2046 err = add_res_range(dev, slave, xrcdn, 1, RES_XRCD, 0); xrcdn_alloc_res()
2055 int mlx4_ALLOC_RES_wrapper(struct mlx4_dev *dev, int slave, mlx4_ALLOC_RES_wrapper() argument
2066 err = qp_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2071 err = mtt_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2076 err = mpt_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2081 err = cq_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2086 err = srq_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2091 err = mac_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2097 err = vlan_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2103 err = counter_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2108 err = xrcdn_alloc_res(dev, slave, vhcr->op_modifier, alop, mlx4_ALLOC_RES_wrapper()
2120 static int qp_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, qp_free_res() argument
2132 err = rem_res_range(dev, slave, base, count, RES_QP, 0); qp_free_res()
2135 mlx4_release_resource(dev, slave, RES_QP, count, 0); qp_free_res()
2140 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_RESERVED, qp_free_res()
2148 res_end_move(dev, slave, RES_QP, qpn); qp_free_res()
2150 if (valid_reserved(dev, slave, qpn)) qp_free_res()
2151 err = rem_res_range(dev, slave, qpn, 1, RES_QP, 0); qp_free_res()
2160 static int mtt_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, mtt_free_res() argument
2172 err = rem_res_range(dev, slave, base, 1, RES_MTT, order); mtt_free_res()
2174 mlx4_release_resource(dev, slave, RES_MTT, 1 << order, 0); mtt_free_res()
2180 static int mpt_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, mpt_free_res() argument
2192 err = get_res(dev, slave, id, RES_MPT, &mpt); mpt_free_res()
2196 put_res(dev, slave, id, RES_MPT); mpt_free_res()
2198 err = rem_res_range(dev, slave, id, 1, RES_MPT, 0); mpt_free_res()
2201 mlx4_release_resource(dev, slave, RES_MPT, 1, 0); mpt_free_res()
2207 err = mr_res_start_move_to(dev, slave, id, mpt_free_res()
2213 res_end_move(dev, slave, RES_MPT, id); mpt_free_res()
2223 static int cq_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, cq_free_res() argument
2232 err = rem_res_range(dev, slave, cqn, 1, RES_CQ, 0); cq_free_res()
2236 mlx4_release_resource(dev, slave, RES_CQ, 1, 0); cq_free_res()
2248 static int srq_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, srq_free_res() argument
2257 err = rem_res_range(dev, slave, srqn, 1, RES_SRQ, 0); srq_free_res()
2261 mlx4_release_resource(dev, slave, RES_SRQ, 1, 0); srq_free_res()
2273 static int mac_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, mac_free_res() argument
2283 dev, slave, port); mac_free_res()
2287 mac_del_from_slave(dev, slave, in_param, port); mac_free_res()
2299 static int vlan_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, vlan_free_res() argument
2307 dev, slave, port); vlan_free_res()
2313 if (slave_state[slave].old_vlan_api) vlan_free_res()
2317 vlan_del_from_slave(dev, slave, in_param, port); vlan_free_res()
2328 static int counter_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, counter_free_res() argument
2338 err = rem_res_range(dev, slave, index, 1, RES_COUNTER, 0); counter_free_res()
2343 mlx4_release_resource(dev, slave, RES_COUNTER, 1, 0); counter_free_res()
2348 static int xrcdn_free_res(struct mlx4_dev *dev, int slave, int op, int cmd, xrcdn_free_res() argument
2358 err = rem_res_range(dev, slave, xrcdn, 1, RES_XRCD, 0); xrcdn_free_res()
2367 int mlx4_FREE_RES_wrapper(struct mlx4_dev *dev, int slave, mlx4_FREE_RES_wrapper() argument
2378 err = qp_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2383 err = mtt_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2388 err = mpt_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2393 err = cq_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2398 err = srq_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2403 err = mac_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2409 err = vlan_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2415 err = counter_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2420 err = xrcdn_free_res(dev, slave, vhcr->op_modifier, alop, mlx4_FREE_RES_wrapper()
2502 static int check_mtt_range(struct mlx4_dev *dev, int slave, int start, check_mtt_range() argument
2513 int mlx4_SW2HW_MPT_wrapper(struct mlx4_dev *dev, int slave, mlx4_SW2HW_MPT_wrapper() argument
2530 err = mr_res_start_move_to(dev, slave, id, RES_MPT_HW, &mpt); mlx4_SW2HW_MPT_wrapper()
2540 /* Make sure that the PD bits related to the slave id are zeros. */ mlx4_SW2HW_MPT_wrapper()
2543 if (pd_slave != 0 && --pd_slave != slave) { mlx4_SW2HW_MPT_wrapper()
2549 /* FMR and Bind Enable are forbidden in slave devices. */ mlx4_SW2HW_MPT_wrapper()
2563 err = get_res(dev, slave, mtt_base, RES_MTT, &mtt); mlx4_SW2HW_MPT_wrapper()
2567 err = check_mtt_range(dev, slave, mtt_base, mlx4_SW2HW_MPT_wrapper()
2575 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_SW2HW_MPT_wrapper()
2581 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_MPT_wrapper()
2584 res_end_move(dev, slave, RES_MPT, id); mlx4_SW2HW_MPT_wrapper()
2589 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_MPT_wrapper()
2591 res_abort_move(dev, slave, RES_MPT, id); mlx4_SW2HW_MPT_wrapper()
2596 int mlx4_HW2SW_MPT_wrapper(struct mlx4_dev *dev, int slave, mlx4_HW2SW_MPT_wrapper() argument
2608 err = mr_res_start_move_to(dev, slave, id, RES_MPT_MAPPED, &mpt); mlx4_HW2SW_MPT_wrapper()
2612 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_HW2SW_MPT_wrapper()
2619 res_end_move(dev, slave, RES_MPT, id); mlx4_HW2SW_MPT_wrapper()
2623 res_abort_move(dev, slave, RES_MPT, id); mlx4_HW2SW_MPT_wrapper()
2628 int mlx4_QUERY_MPT_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_MPT_wrapper() argument
2640 err = get_res(dev, slave, id, RES_MPT, &mpt); mlx4_QUERY_MPT_wrapper()
2666 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_QUERY_MPT_wrapper()
2674 put_res(dev, slave, id, RES_MPT); mlx4_QUERY_MPT_wrapper()
2706 int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_RST2INIT_QP_wrapper() argument
2728 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_HW, &qp, 0); mlx4_RST2INIT_QP_wrapper()
2741 err = get_res(dev, slave, mtt_base, RES_MTT, &mtt); mlx4_RST2INIT_QP_wrapper()
2745 err = check_mtt_range(dev, slave, mtt_base, mtt_size, mtt); mlx4_RST2INIT_QP_wrapper()
2749 err = get_res(dev, slave, rcqn, RES_CQ, &rcq); mlx4_RST2INIT_QP_wrapper()
2754 err = get_res(dev, slave, scqn, RES_CQ, &scq); mlx4_RST2INIT_QP_wrapper()
2761 err = get_res(dev, slave, srqn, RES_SRQ, &srq); mlx4_RST2INIT_QP_wrapper()
2767 update_pkey_index(dev, slave, inbox); mlx4_RST2INIT_QP_wrapper()
2768 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_RST2INIT_QP_wrapper()
2779 put_res(dev, slave, scqn, RES_CQ); mlx4_RST2INIT_QP_wrapper()
2783 put_res(dev, slave, srqn, RES_SRQ); mlx4_RST2INIT_QP_wrapper()
2786 put_res(dev, slave, rcqn, RES_CQ); mlx4_RST2INIT_QP_wrapper()
2787 put_res(dev, slave, mtt_base, RES_MTT); mlx4_RST2INIT_QP_wrapper()
2788 res_end_move(dev, slave, RES_QP, qpn); mlx4_RST2INIT_QP_wrapper()
2794 put_res(dev, slave, srqn, RES_SRQ); mlx4_RST2INIT_QP_wrapper()
2797 put_res(dev, slave, scqn, RES_CQ); mlx4_RST2INIT_QP_wrapper()
2799 put_res(dev, slave, rcqn, RES_CQ); mlx4_RST2INIT_QP_wrapper()
2801 put_res(dev, slave, mtt_base, RES_MTT); mlx4_RST2INIT_QP_wrapper()
2803 res_abort_move(dev, slave, RES_QP, qpn); mlx4_RST2INIT_QP_wrapper()
2840 int mlx4_SW2HW_EQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_SW2HW_EQ_wrapper() argument
2848 int res_id = (slave << 10) | eqn; mlx4_SW2HW_EQ_wrapper()
2855 err = add_res_range(dev, slave, res_id, 1, RES_EQ, 0); mlx4_SW2HW_EQ_wrapper()
2858 err = eq_res_start_move_to(dev, slave, res_id, RES_EQ_HW, &eq); mlx4_SW2HW_EQ_wrapper()
2862 err = get_res(dev, slave, mtt_base, RES_MTT, &mtt); mlx4_SW2HW_EQ_wrapper()
2866 err = check_mtt_range(dev, slave, mtt_base, mtt_size, mtt); mlx4_SW2HW_EQ_wrapper()
2870 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_SW2HW_EQ_wrapper()
2876 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_EQ_wrapper()
2877 res_end_move(dev, slave, RES_EQ, res_id); mlx4_SW2HW_EQ_wrapper()
2881 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_EQ_wrapper()
2883 res_abort_move(dev, slave, RES_EQ, res_id); mlx4_SW2HW_EQ_wrapper()
2885 rem_res_range(dev, slave, res_id, 1, RES_EQ, 0); mlx4_SW2HW_EQ_wrapper()
2889 int mlx4_CONFIG_DEV_wrapper(struct mlx4_dev *dev, int slave, mlx4_CONFIG_DEV_wrapper() argument
2901 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_CONFIG_DEV_wrapper()
2906 static int get_containing_mtt(struct mlx4_dev *dev, int slave, int start, get_containing_mtt() argument
2915 list_for_each_entry(mtt, &tracker->slave_list[slave].res_list[RES_MTT], get_containing_mtt()
2917 if (!check_mtt_range(dev, slave, start, len, mtt)) { get_containing_mtt()
2933 enum qp_transition transition, u8 slave) verify_qp_parameters()
2946 if (slave != mlx4_master_func_num(dev)) { verify_qp_parameters()
2963 if (slave != mlx4_master_func_num(dev)) verify_qp_parameters()
2967 num_gids = mlx4_get_slave_num_gids(dev, slave, port); verify_qp_parameters()
2976 num_gids = mlx4_get_slave_num_gids(dev, slave, port); verify_qp_parameters()
2992 slave != mlx4_master_func_num(dev) && verify_qp_parameters()
2994 !mlx4_vf_smi_enabled(dev, slave, port)) { verify_qp_parameters()
2996 mlx4_err(dev, "%s: unprivileged slave %d attempting to create an MLX proxy special QP on port %d\n", verify_qp_parameters()
2997 __func__, slave, port); verify_qp_parameters()
3009 int mlx4_WRITE_MTT_wrapper(struct mlx4_dev *dev, int slave, mlx4_WRITE_MTT_wrapper() argument
3024 err = get_containing_mtt(dev, slave, start, npages, &rmtt); mlx4_WRITE_MTT_wrapper()
3042 put_res(dev, slave, rmtt->com.res_id, RES_MTT); mlx4_WRITE_MTT_wrapper()
3047 int mlx4_HW2SW_EQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_HW2SW_EQ_wrapper() argument
3054 int res_id = eqn | (slave << 10); mlx4_HW2SW_EQ_wrapper()
3058 err = eq_res_start_move_to(dev, slave, res_id, RES_EQ_RESERVED, &eq); mlx4_HW2SW_EQ_wrapper()
3062 err = get_res(dev, slave, eq->mtt->com.res_id, RES_MTT, NULL); mlx4_HW2SW_EQ_wrapper()
3066 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_HW2SW_EQ_wrapper()
3071 put_res(dev, slave, eq->mtt->com.res_id, RES_MTT); mlx4_HW2SW_EQ_wrapper()
3072 res_end_move(dev, slave, RES_EQ, res_id); mlx4_HW2SW_EQ_wrapper()
3073 rem_res_range(dev, slave, res_id, 1, RES_EQ, 0); mlx4_HW2SW_EQ_wrapper()
3078 put_res(dev, slave, eq->mtt->com.res_id, RES_MTT); mlx4_HW2SW_EQ_wrapper()
3080 res_abort_move(dev, slave, RES_EQ, res_id); mlx4_HW2SW_EQ_wrapper()
3085 int mlx4_GEN_EQE(struct mlx4_dev *dev, int slave, struct mlx4_eqe *eqe) mlx4_GEN_EQE() argument
3098 /* check for slave valid, slave not PF, and slave active */ mlx4_GEN_EQE()
3099 if (slave < 0 || slave > dev->persist->num_vfs || mlx4_GEN_EQE()
3100 slave == dev->caps.function || mlx4_GEN_EQE()
3101 !priv->mfunc.master.slave_state[slave].active) mlx4_GEN_EQE()
3104 event_eq = &priv->mfunc.master.slave_state[slave].event_eq[eqe->type]; mlx4_GEN_EQE()
3106 /* Create the event only if the slave is registered */ mlx4_GEN_EQE()
3110 mutex_lock(&priv->mfunc.master.gen_eqe_mutex[slave]); mlx4_GEN_EQE()
3111 res_id = (slave << 10) | event_eq->eqn; mlx4_GEN_EQE()
3112 err = get_res(dev, slave, res_id, RES_EQ, &req); mlx4_GEN_EQE()
3134 in_modifier = (slave & 0xff) | ((event_eq->eqn & 0x3ff) << 16); mlx4_GEN_EQE()
3140 put_res(dev, slave, res_id, RES_EQ); mlx4_GEN_EQE()
3141 mutex_unlock(&priv->mfunc.master.gen_eqe_mutex[slave]); mlx4_GEN_EQE()
3146 put_res(dev, slave, res_id, RES_EQ); mlx4_GEN_EQE()
3149 mutex_unlock(&priv->mfunc.master.gen_eqe_mutex[slave]); mlx4_GEN_EQE()
3153 int mlx4_QUERY_EQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_EQ_wrapper() argument
3160 int res_id = eqn | (slave << 10); mlx4_QUERY_EQ_wrapper()
3164 err = get_res(dev, slave, res_id, RES_EQ, &eq); mlx4_QUERY_EQ_wrapper()
3173 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_QUERY_EQ_wrapper()
3176 put_res(dev, slave, res_id, RES_EQ); mlx4_QUERY_EQ_wrapper()
3180 int mlx4_SW2HW_CQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_SW2HW_CQ_wrapper() argument
3193 err = cq_res_start_move_to(dev, slave, cqn, RES_CQ_HW, &cq); mlx4_SW2HW_CQ_wrapper()
3196 err = get_res(dev, slave, mtt_base, RES_MTT, &mtt); mlx4_SW2HW_CQ_wrapper()
3199 err = check_mtt_range(dev, slave, mtt_base, cq_get_mtt_size(cqc), mtt); mlx4_SW2HW_CQ_wrapper()
3202 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_SW2HW_CQ_wrapper()
3207 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_CQ_wrapper()
3208 res_end_move(dev, slave, RES_CQ, cqn); mlx4_SW2HW_CQ_wrapper()
3212 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_CQ_wrapper()
3214 res_abort_move(dev, slave, RES_CQ, cqn); mlx4_SW2HW_CQ_wrapper()
3218 int mlx4_HW2SW_CQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_HW2SW_CQ_wrapper() argument
3228 err = cq_res_start_move_to(dev, slave, cqn, RES_CQ_ALLOCATED, &cq); mlx4_HW2SW_CQ_wrapper()
3231 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_HW2SW_CQ_wrapper()
3235 res_end_move(dev, slave, RES_CQ, cqn); mlx4_HW2SW_CQ_wrapper()
3239 res_abort_move(dev, slave, RES_CQ, cqn); mlx4_HW2SW_CQ_wrapper()
3243 int mlx4_QUERY_CQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_CQ_wrapper() argument
3253 err = get_res(dev, slave, cqn, RES_CQ, &cq); mlx4_QUERY_CQ_wrapper()
3260 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_QUERY_CQ_wrapper()
3262 put_res(dev, slave, cqn, RES_CQ); mlx4_QUERY_CQ_wrapper()
3267 static int handle_resize(struct mlx4_dev *dev, int slave, handle_resize() argument
3280 err = get_res(dev, slave, cq->mtt->com.res_id, RES_MTT, &orig_mtt); handle_resize()
3289 err = get_res(dev, slave, mtt_base, RES_MTT, &mtt); handle_resize()
3293 err = check_mtt_range(dev, slave, mtt_base, cq_get_mtt_size(cqc), mtt); handle_resize()
3296 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); handle_resize()
3300 put_res(dev, slave, orig_mtt->com.res_id, RES_MTT); handle_resize()
3303 put_res(dev, slave, mtt->com.res_id, RES_MTT); handle_resize()
3307 put_res(dev, slave, mtt->com.res_id, RES_MTT); handle_resize()
3309 put_res(dev, slave, orig_mtt->com.res_id, RES_MTT); handle_resize()
3315 int mlx4_MODIFY_CQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_MODIFY_CQ_wrapper() argument
3325 err = get_res(dev, slave, cqn, RES_CQ, &cq); mlx4_MODIFY_CQ_wrapper()
3333 err = handle_resize(dev, slave, vhcr, inbox, outbox, cmd, cq); mlx4_MODIFY_CQ_wrapper()
3337 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_MODIFY_CQ_wrapper()
3339 put_res(dev, slave, cqn, RES_CQ); mlx4_MODIFY_CQ_wrapper()
3356 int mlx4_SW2HW_SRQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_SW2HW_SRQ_wrapper() argument
3372 err = srq_res_start_move_to(dev, slave, srqn, RES_SRQ_HW, &srq); mlx4_SW2HW_SRQ_wrapper()
3375 err = get_res(dev, slave, mtt_base, RES_MTT, &mtt); mlx4_SW2HW_SRQ_wrapper()
3378 err = check_mtt_range(dev, slave, mtt_base, srq_get_mtt_size(srqc), mlx4_SW2HW_SRQ_wrapper()
3383 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_SW2HW_SRQ_wrapper()
3389 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_SRQ_wrapper()
3390 res_end_move(dev, slave, RES_SRQ, srqn); mlx4_SW2HW_SRQ_wrapper()
3394 put_res(dev, slave, mtt->com.res_id, RES_MTT); mlx4_SW2HW_SRQ_wrapper()
3396 res_abort_move(dev, slave, RES_SRQ, srqn); mlx4_SW2HW_SRQ_wrapper()
3401 int mlx4_HW2SW_SRQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_HW2SW_SRQ_wrapper() argument
3411 err = srq_res_start_move_to(dev, slave, srqn, RES_SRQ_ALLOCATED, &srq); mlx4_HW2SW_SRQ_wrapper()
3414 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_HW2SW_SRQ_wrapper()
3420 res_end_move(dev, slave, RES_SRQ, srqn); mlx4_HW2SW_SRQ_wrapper()
3425 res_abort_move(dev, slave, RES_SRQ, srqn); mlx4_HW2SW_SRQ_wrapper()
3430 int mlx4_QUERY_SRQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_SRQ_wrapper() argument
3440 err = get_res(dev, slave, srqn, RES_SRQ, &srq); mlx4_QUERY_SRQ_wrapper()
3447 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_QUERY_SRQ_wrapper()
3449 put_res(dev, slave, srqn, RES_SRQ); mlx4_QUERY_SRQ_wrapper()
3453 int mlx4_ARM_SRQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_ARM_SRQ_wrapper() argument
3463 err = get_res(dev, slave, srqn, RES_SRQ, &srq); mlx4_ARM_SRQ_wrapper()
3472 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_ARM_SRQ_wrapper()
3474 put_res(dev, slave, srqn, RES_SRQ); mlx4_ARM_SRQ_wrapper()
3478 int mlx4_GEN_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_GEN_QP_wrapper() argument
3488 err = get_res(dev, slave, qpn, RES_QP, &qp); mlx4_GEN_QP_wrapper()
3496 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_GEN_QP_wrapper()
3498 put_res(dev, slave, qpn, RES_QP); mlx4_GEN_QP_wrapper()
3502 int mlx4_INIT2INIT_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_INIT2INIT_QP_wrapper() argument
3510 update_pkey_index(dev, slave, inbox); mlx4_INIT2INIT_QP_wrapper()
3511 return mlx4_GEN_QP_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_INIT2INIT_QP_wrapper()
3514 static int adjust_qp_sched_queue(struct mlx4_dev *dev, int slave, adjust_qp_sched_queue() argument
3521 dev, slave, (qpc->pri_path.sched_queue >> 6 & 1) + 1) - 1; adjust_qp_sched_queue()
3536 dev, slave, (qpc->alt_path.sched_queue >> 6 & 1) adjust_qp_sched_queue()
3547 static int roce_verify_mac(struct mlx4_dev *dev, int slave, roce_verify_mac() argument
3560 if (mac_find_smac_ix_in_slave(dev, slave, port, smac_ix, &mac)) roce_verify_mac()
3566 int mlx4_INIT2RTR_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_INIT2RTR_QP_wrapper() argument
3584 err = adjust_qp_sched_queue(dev, slave, qpc, inbox); mlx4_INIT2RTR_QP_wrapper()
3587 err = verify_qp_parameters(dev, vhcr, inbox, QP_TRANS_INIT2RTR, slave); mlx4_INIT2RTR_QP_wrapper()
3591 if (roce_verify_mac(dev, slave, qpc, inbox)) mlx4_INIT2RTR_QP_wrapper()
3594 update_pkey_index(dev, slave, inbox); mlx4_INIT2RTR_QP_wrapper()
3595 update_gid(dev, inbox, (u8)slave); mlx4_INIT2RTR_QP_wrapper()
3598 err = update_vport_qp_param(dev, inbox, slave, qpn); mlx4_INIT2RTR_QP_wrapper()
3602 err = get_res(dev, slave, qpn, RES_QP, &qp); mlx4_INIT2RTR_QP_wrapper()
3610 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_INIT2RTR_QP_wrapper()
3625 put_res(dev, slave, qpn, RES_QP); mlx4_INIT2RTR_QP_wrapper()
3629 int mlx4_RTR2RTS_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_RTR2RTS_QP_wrapper() argument
3638 err = adjust_qp_sched_queue(dev, slave, context, inbox); mlx4_RTR2RTS_QP_wrapper()
3641 err = verify_qp_parameters(dev, vhcr, inbox, QP_TRANS_RTR2RTS, slave); mlx4_RTR2RTS_QP_wrapper()
3645 update_pkey_index(dev, slave, inbox); mlx4_RTR2RTS_QP_wrapper()
3646 update_gid(dev, inbox, (u8)slave); mlx4_RTR2RTS_QP_wrapper()
3648 return mlx4_GEN_QP_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_RTR2RTS_QP_wrapper()
3651 int mlx4_RTS2RTS_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_RTS2RTS_QP_wrapper() argument
3660 err = adjust_qp_sched_queue(dev, slave, context, inbox); mlx4_RTS2RTS_QP_wrapper()
3663 err = verify_qp_parameters(dev, vhcr, inbox, QP_TRANS_RTS2RTS, slave); mlx4_RTS2RTS_QP_wrapper()
3667 update_pkey_index(dev, slave, inbox); mlx4_RTS2RTS_QP_wrapper()
3668 update_gid(dev, inbox, (u8)slave); mlx4_RTS2RTS_QP_wrapper()
3670 return mlx4_GEN_QP_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_RTS2RTS_QP_wrapper()
3674 int mlx4_SQERR2RTS_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_SQERR2RTS_QP_wrapper() argument
3681 int err = adjust_qp_sched_queue(dev, slave, context, inbox); mlx4_SQERR2RTS_QP_wrapper()
3685 return mlx4_GEN_QP_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_SQERR2RTS_QP_wrapper()
3688 int mlx4_SQD2SQD_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_SQD2SQD_QP_wrapper() argument
3697 err = adjust_qp_sched_queue(dev, slave, context, inbox); mlx4_SQD2SQD_QP_wrapper()
3700 err = verify_qp_parameters(dev, vhcr, inbox, QP_TRANS_SQD2SQD, slave); mlx4_SQD2SQD_QP_wrapper()
3705 update_gid(dev, inbox, (u8)slave); mlx4_SQD2SQD_QP_wrapper()
3706 update_pkey_index(dev, slave, inbox); mlx4_SQD2SQD_QP_wrapper()
3707 return mlx4_GEN_QP_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_SQD2SQD_QP_wrapper()
3710 int mlx4_SQD2RTS_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_SQD2RTS_QP_wrapper() argument
3719 err = adjust_qp_sched_queue(dev, slave, context, inbox); mlx4_SQD2RTS_QP_wrapper()
3722 err = verify_qp_parameters(dev, vhcr, inbox, QP_TRANS_SQD2RTS, slave); mlx4_SQD2RTS_QP_wrapper()
3727 update_gid(dev, inbox, (u8)slave); mlx4_SQD2RTS_QP_wrapper()
3728 update_pkey_index(dev, slave, inbox); mlx4_SQD2RTS_QP_wrapper()
3729 return mlx4_GEN_QP_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_SQD2RTS_QP_wrapper()
3732 int mlx4_2RST_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_2RST_QP_wrapper() argument
3742 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_MAPPED, &qp, 0); mlx4_2RST_QP_wrapper()
3745 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_2RST_QP_wrapper()
3754 res_end_move(dev, slave, RES_QP, qpn); mlx4_2RST_QP_wrapper()
3758 res_abort_move(dev, slave, RES_QP, qpn); mlx4_2RST_QP_wrapper()
3763 static struct res_gid *find_gid(struct mlx4_dev *dev, int slave, find_gid() argument
3775 static int add_mcg_res(struct mlx4_dev *dev, int slave, struct res_qp *rqp, add_mcg_res() argument
3787 if (find_gid(dev, slave, rqp, gid)) { add_mcg_res()
3803 static int rem_mcg_res(struct mlx4_dev *dev, int slave, struct res_qp *rqp, rem_mcg_res() argument
3811 res = find_gid(dev, slave, rqp, gid); rem_mcg_res()
3825 static int qp_attach(struct mlx4_dev *dev, int slave, struct mlx4_qp *qp, qp_attach() argument
3831 int port = mlx4_slave_convert_port(dev, slave, gid[5]); qp_attach()
3840 int port = mlx4_slave_convert_port(dev, slave, gid[5]); qp_attach()
3866 static int mlx4_adjust_port(struct mlx4_dev *dev, int slave, mlx4_adjust_port() argument
3876 real_port = mlx4_slave_convert_port(dev, slave, gid[5]); mlx4_adjust_port()
3885 int mlx4_QP_ATTACH_wrapper(struct mlx4_dev *dev, int slave, mlx4_QP_ATTACH_wrapper() argument
3904 err = get_res(dev, slave, qpn, RES_QP, &rqp); mlx4_QP_ATTACH_wrapper()
3910 err = qp_attach(dev, slave, &qp, gid, block_loopback, prot, mlx4_QP_ATTACH_wrapper()
3916 err = add_mcg_res(dev, slave, rqp, gid, prot, type, reg_id); mlx4_QP_ATTACH_wrapper()
3920 err = mlx4_adjust_port(dev, slave, gid, prot); mlx4_QP_ATTACH_wrapper()
3924 err = rem_mcg_res(dev, slave, rqp, gid, prot, type, &reg_id); mlx4_QP_ATTACH_wrapper()
3933 put_res(dev, slave, qpn, RES_QP); mlx4_QP_ATTACH_wrapper()
3939 put_res(dev, slave, qpn, RES_QP); mlx4_QP_ATTACH_wrapper()
3947 static int validate_eth_header_mac(int slave, struct _rule_hw *eth_header, validate_eth_header_mac() argument
3962 eth_header->eth.dst_mac, slave);
3972 static int add_eth_header(struct mlx4_dev *dev, int slave, add_eth_header() argument
4029 int mlx4_UPDATE_QP_wrapper(struct mlx4_dev *dev, int slave, mlx4_UPDATE_QP_wrapper() argument
4052 err = get_res(dev, slave, qpn, RES_QP, &rqp); mlx4_UPDATE_QP_wrapper()
4054 mlx4_err(dev, "Updating qpn 0x%x for slave %d rejected\n", qpn, slave); mlx4_UPDATE_QP_wrapper()
4062 err = mac_find_smac_ix_in_slave(dev, slave, port, mlx4_UPDATE_QP_wrapper()
4082 put_res(dev, slave, qpn, RES_QP); mlx4_UPDATE_QP_wrapper()
4086 int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev *dev, int slave, mlx4_QP_FLOW_STEERING_ATTACH_wrapper() argument
4095 struct list_head *rlist = &tracker->slave_list[slave].res_list[RES_MAC]; mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4108 ctrl->port = mlx4_slave_convert_port(dev, slave, ctrl->port); mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4112 err = get_res(dev, slave, qpn, RES_QP, &rqp); mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4122 if (validate_eth_header_mac(slave, rule_header, rlist)) { mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4133 if (add_eth_header(dev, slave, inbox, rlist, header_id)) { mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4153 err = add_res_range(dev, slave, vhcr->out_param, 1, RES_FS_RULE, qpn); mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4164 put_res(dev, slave, qpn, RES_QP); mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4168 int mlx4_QP_FLOW_STEERING_DETACH_wrapper(struct mlx4_dev *dev, int slave, mlx4_QP_FLOW_STEERING_DETACH_wrapper() argument
4182 err = get_res(dev, slave, vhcr->in_param, RES_FS_RULE, &rrule); mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4186 put_res(dev, slave, vhcr->in_param, RES_FS_RULE); mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4187 err = get_res(dev, slave, rrule->qpn, RES_QP, &rqp); mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4191 err = rem_res_range(dev, slave, vhcr->in_param, 1, RES_FS_RULE, 0); mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4203 put_res(dev, slave, rrule->qpn, RES_QP); mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4211 int mlx4_QUERY_IF_STAT_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_IF_STAT_wrapper() argument
4220 err = get_res(dev, slave, index, RES_COUNTER, NULL); mlx4_QUERY_IF_STAT_wrapper()
4224 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); mlx4_QUERY_IF_STAT_wrapper()
4225 put_res(dev, slave, index, RES_COUNTER); mlx4_QUERY_IF_STAT_wrapper()
4229 static void detach_qp(struct mlx4_dev *dev, int slave, struct res_qp *rqp) detach_qp() argument
4251 static int _move_all_busy(struct mlx4_dev *dev, int slave, _move_all_busy() argument
4257 struct list_head *rlist = &tracker->slave_list[slave].res_list[type]; _move_all_busy()
4265 if (r->owner == slave) { list_for_each_entry_safe()
4287 static int move_all_busy(struct mlx4_dev *dev, int slave, move_all_busy() argument
4295 busy = _move_all_busy(dev, slave, type, 0); move_all_busy()
4303 busy = _move_all_busy(dev, slave, type, 1); move_all_busy()
4307 static void rem_slave_qps(struct mlx4_dev *dev, int slave) rem_slave_qps() argument
4312 &tracker->slave_list[slave].res_list[RES_QP]; rem_slave_qps()
4320 err = move_all_busy(dev, slave, RES_QP); rem_slave_qps()
4322 mlx4_warn(dev, "rem_slave_qps: Could not move all qps to busy for slave %d\n", rem_slave_qps()
4323 slave); rem_slave_qps()
4328 if (qp->com.owner == slave) { list_for_each_entry_safe()
4330 detach_qp(dev, slave, qp); list_for_each_entry_safe()
4340 if (!valid_reserved(dev, slave, qpn)) { list_for_each_entry_safe()
4342 mlx4_release_resource(dev, slave, list_for_each_entry_safe()
4349 if (!valid_reserved(dev, slave, qpn)) list_for_each_entry_safe()
4354 in_param = slave; list_for_each_entry_safe()
4361 mlx4_dbg(dev, "rem_slave_qps: failed to move slave %d qpn %d to reset\n", list_for_each_entry_safe()
4362 slave, qp->local_qpn); list_for_each_entry_safe()
4380 static void rem_slave_srqs(struct mlx4_dev *dev, int slave) rem_slave_srqs() argument
4385 &tracker->slave_list[slave].res_list[RES_SRQ]; rem_slave_srqs()
4394 err = move_all_busy(dev, slave, RES_SRQ); rem_slave_srqs()
4396 mlx4_warn(dev, "rem_slave_srqs: Could not move all srqs - too busy for slave %d\n", rem_slave_srqs()
4397 slave); rem_slave_srqs()
4402 if (srq->com.owner == slave) { list_for_each_entry_safe()
4414 mlx4_release_resource(dev, slave, list_for_each_entry_safe()
4421 in_param = slave; list_for_each_entry_safe()
4427 mlx4_dbg(dev, "rem_slave_srqs: failed to move slave %d srq %d to SW ownership\n", list_for_each_entry_safe()
4428 slave, srqn); list_for_each_entry_safe()
4446 static void rem_slave_cqs(struct mlx4_dev *dev, int slave) rem_slave_cqs() argument
4451 &tracker->slave_list[slave].res_list[RES_CQ]; rem_slave_cqs()
4460 err = move_all_busy(dev, slave, RES_CQ); rem_slave_cqs()
4462 mlx4_warn(dev, "rem_slave_cqs: Could not move all cqs - too busy for slave %d\n", rem_slave_cqs()
4463 slave); rem_slave_cqs()
4468 if (cq->com.owner == slave && !atomic_read(&cq->ref_count)) { list_for_each_entry_safe()
4480 mlx4_release_resource(dev, slave, list_for_each_entry_safe()
4487 in_param = slave; list_for_each_entry_safe()
4493 mlx4_dbg(dev, "rem_slave_cqs: failed to move slave %d cq %d to SW ownership\n", list_for_each_entry_safe()
4494 slave, cqn); list_for_each_entry_safe()
4509 static void rem_slave_mrs(struct mlx4_dev *dev, int slave) rem_slave_mrs() argument
4514 &tracker->slave_list[slave].res_list[RES_MPT]; rem_slave_mrs()
4523 err = move_all_busy(dev, slave, RES_MPT); rem_slave_mrs()
4525 mlx4_warn(dev, "rem_slave_mrs: Could not move all mpts - too busy for slave %d\n", rem_slave_mrs()
4526 slave); rem_slave_mrs()
4531 if (mpt->com.owner == slave) { list_for_each_entry_safe()
4543 mlx4_release_resource(dev, slave, list_for_each_entry_safe()
4555 in_param = slave; list_for_each_entry_safe()
4561 mlx4_dbg(dev, "rem_slave_mrs: failed to move slave %d mpt %d to SW ownership\n", list_for_each_entry_safe()
4562 slave, mptn); list_for_each_entry_safe()
4577 static void rem_slave_mtts(struct mlx4_dev *dev, int slave) rem_slave_mtts() argument
4583 &tracker->slave_list[slave].res_list[RES_MTT]; rem_slave_mtts()
4591 err = move_all_busy(dev, slave, RES_MTT); rem_slave_mtts()
4593 mlx4_warn(dev, "rem_slave_mtts: Could not move all mtts - too busy for slave %d\n", rem_slave_mtts()
4594 slave); rem_slave_mtts()
4599 if (mtt->com.owner == slave) { list_for_each_entry_safe()
4612 mlx4_release_resource(dev, slave, RES_MTT, list_for_each_entry_safe()
4628 static void rem_slave_fs_rule(struct mlx4_dev *dev, int slave) rem_slave_fs_rule() argument
4634 &tracker->slave_list[slave].res_list[RES_FS_RULE]; rem_slave_fs_rule()
4641 err = move_all_busy(dev, slave, RES_FS_RULE); rem_slave_fs_rule()
4643 mlx4_warn(dev, "rem_slave_fs_rule: Could not move all mtts to busy for slave %d\n", rem_slave_fs_rule()
4644 slave); rem_slave_fs_rule()
4649 if (fs_rule->com.owner == slave) { list_for_each_entry_safe()
4680 static void rem_slave_eqs(struct mlx4_dev *dev, int slave) rem_slave_eqs() argument
4685 &tracker->slave_list[slave].res_list[RES_EQ]; rem_slave_eqs()
4693 err = move_all_busy(dev, slave, RES_EQ); rem_slave_eqs()
4695 mlx4_warn(dev, "rem_slave_eqs: Could not move all eqs - too busy for slave %d\n", rem_slave_eqs()
4696 slave); rem_slave_eqs()
4701 if (eq->com.owner == slave) { list_for_each_entry_safe()
4717 err = mlx4_cmd(dev, slave, eqn & 0x3ff, list_for_each_entry_safe()
4722 mlx4_dbg(dev, "rem_slave_eqs: failed to move slave %d eqs %d to SW ownership\n", list_for_each_entry_safe()
4723 slave, eqn & 0x3ff); list_for_each_entry_safe()
4738 static void rem_slave_counters(struct mlx4_dev *dev, int slave) rem_slave_counters() argument
4743 &tracker->slave_list[slave].res_list[RES_COUNTER]; rem_slave_counters()
4749 err = move_all_busy(dev, slave, RES_COUNTER); rem_slave_counters()
4751 mlx4_warn(dev, "rem_slave_counters: Could not move all counters - too busy for slave %d\n", rem_slave_counters()
4752 slave); rem_slave_counters()
4756 if (counter->com.owner == slave) { list_for_each_entry_safe()
4763 mlx4_release_resource(dev, slave, RES_COUNTER, 1, 0); list_for_each_entry_safe()
4769 static void rem_slave_xrcdns(struct mlx4_dev *dev, int slave) rem_slave_xrcdns() argument
4774 &tracker->slave_list[slave].res_list[RES_XRCD]; rem_slave_xrcdns()
4780 err = move_all_busy(dev, slave, RES_XRCD); rem_slave_xrcdns()
4782 mlx4_warn(dev, "rem_slave_xrcdns: Could not move all xrcdns - too busy for slave %d\n", rem_slave_xrcdns()
4783 slave); rem_slave_xrcdns()
4787 if (xrcd->com.owner == slave) { list_for_each_entry_safe()
4798 void mlx4_delete_all_resources_for_slave(struct mlx4_dev *dev, int slave) mlx4_delete_all_resources_for_slave() argument
4801 mlx4_reset_roce_gids(dev, slave); mlx4_delete_all_resources_for_slave()
4802 mutex_lock(&priv->mfunc.master.res_tracker.slave_list[slave].mutex); mlx4_delete_all_resources_for_slave()
4803 rem_slave_vlans(dev, slave); mlx4_delete_all_resources_for_slave()
4804 rem_slave_macs(dev, slave); mlx4_delete_all_resources_for_slave()
4805 rem_slave_fs_rule(dev, slave); mlx4_delete_all_resources_for_slave()
4806 rem_slave_qps(dev, slave); mlx4_delete_all_resources_for_slave()
4807 rem_slave_srqs(dev, slave); mlx4_delete_all_resources_for_slave()
4808 rem_slave_cqs(dev, slave); mlx4_delete_all_resources_for_slave()
4809 rem_slave_mrs(dev, slave); mlx4_delete_all_resources_for_slave()
4810 rem_slave_eqs(dev, slave); mlx4_delete_all_resources_for_slave()
4811 rem_slave_mtts(dev, slave); mlx4_delete_all_resources_for_slave()
4812 rem_slave_counters(dev, slave); mlx4_delete_all_resources_for_slave()
4813 rem_slave_xrcdns(dev, slave); mlx4_delete_all_resources_for_slave()
4814 mutex_unlock(&priv->mfunc.master.res_tracker.slave_list[slave].mutex); mlx4_delete_all_resources_for_slave()
4827 &tracker->slave_list[work->slave].res_list[RES_QP]; mlx4_vf_immed_vlan_work_handler()
4851 mlx4_warn(dev, "Trying to update-qp in slave %d\n", mlx4_vf_immed_vlan_work_handler()
4852 work->slave); mlx4_vf_immed_vlan_work_handler()
4880 if (qp->com.owner == work->slave) { list_for_each_entry_safe()
4933 mlx4_info(dev, "UPDATE_QP failed for slave %d, port %d, qpn %d (%d)\n", list_for_each_entry_safe()
4934 work->slave, port, qp->local_qpn, err); list_for_each_entry_safe()
4944 mlx4_err(dev, "%d UPDATE_QP failures for slave %d, port %d\n",
4945 errors, work->slave, work->port);
663 update_gid(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *inbox, u8 slave) update_gid() argument
703 update_vport_qp_param(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *inbox, u8 slave, u32 qpn) update_vport_qp_param() argument
827 mlx4_get_slave_from_resource_id(struct mlx4_dev *dev, enum mlx4_resource type, u64 res_id, int *slave) mlx4_get_slave_from_resource_id() argument
2930 verify_qp_parameters(struct mlx4_dev *dev, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, enum qp_transition transition, u8 slave) verify_qp_parameters() argument
H A Dcmd.c134 static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave,
317 /* check if the slave is trying to boot in the middle of mlx4_comm_cmd_poll()
799 int slave, u64 slave_addr, mlx4_ACCESS_MEM()
806 (slave & ~0x7f) | (size & 0xff)) { mlx4_ACCESS_MEM()
808 slave_addr, master_addr, slave, size); mlx4_ACCESS_MEM()
813 in_param = (u64) slave | slave_addr; mlx4_ACCESS_MEM()
817 out_param = (u64) slave | slave_addr; mlx4_ACCESS_MEM()
877 static int mlx4_MAD_IFC_wrapper(struct mlx4_dev *dev, int slave, mlx4_MAD_IFC_wrapper() argument
923 pidx = priv->virt2phys_pkey[slave][port - 1][vidx]; mlx4_MAD_IFC_wrapper()
931 /*get the slave specific caps:*/ mlx4_MAD_IFC_wrapper()
937 if (!err && slave != mlx4_master_func_num(dev)) { mlx4_MAD_IFC_wrapper()
940 *state = (*state & 0xf0) | vf_port_state(dev, port, slave); mlx4_MAD_IFC_wrapper()
941 slave_cap_mask = priv->mfunc.master.slave_state[slave].ib_cap_mask[port]; mlx4_MAD_IFC_wrapper()
947 __be64 guid = mlx4_get_admin_guid(dev, slave, mlx4_MAD_IFC_wrapper()
953 if (slave == 0 && guid == 0) { mlx4_MAD_IFC_wrapper()
967 data, slave, port); mlx4_MAD_IFC_wrapper()
981 slave_node_guid = mlx4_get_slave_node_guid(dev, slave); mlx4_MAD_IFC_wrapper()
992 if (slave != mlx4_master_func_num(dev) && mlx4_MAD_IFC_wrapper()
993 !mlx4_vf_smi_enabled(dev, slave, port)) { mlx4_MAD_IFC_wrapper()
996 mlx4_err(dev, "Unprivileged slave %d is trying to execute a Subnet MGMT MAD, class 0x%x, method 0x%x, view=%s for attr 0x%x. Rejecting\n", mlx4_MAD_IFC_wrapper()
997 slave, smp->method, smp->mgmt_class, mlx4_MAD_IFC_wrapper()
1009 static int mlx4_CMD_EPERM_wrapper(struct mlx4_dev *dev, int slave, mlx4_CMD_EPERM_wrapper() argument
1018 int mlx4_DMA_wrapper(struct mlx4_dev *dev, int slave, mlx4_DMA_wrapper() argument
1032 in_param |= slave; mlx4_DMA_wrapper()
1645 static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave, mlx4_master_process_vhcr() argument
1667 ret = mlx4_ACCESS_MEM(dev, priv->mfunc.vhcr_dma, slave, mlx4_master_process_vhcr()
1668 priv->mfunc.master.slave_state[slave].vhcr_dma, mlx4_master_process_vhcr()
1698 mlx4_err(dev, "Unknown command:0x%x accepted from slave:%d\n", mlx4_master_process_vhcr()
1699 vhcr->op, slave); mlx4_master_process_vhcr()
1714 ret = mlx4_ACCESS_MEM(dev, inbox->dma, slave, mlx4_master_process_vhcr()
1728 if (cmd->verify && cmd->verify(dev, slave, vhcr, inbox)) { mlx4_master_process_vhcr()
1729 mlx4_warn(dev, "Command:0x%x from slave: %d failed protection checks for resource_id:%d\n", mlx4_master_process_vhcr()
1730 vhcr->op, slave, vhcr->in_modifier); mlx4_master_process_vhcr()
1747 err = cmd->wrapper(dev, slave, vhcr, inbox, outbox, mlx4_master_process_vhcr()
1770 mlx4_warn(dev, "vhcr command:0x%x slave:%d failed with error:%d, status %d\n", mlx4_master_process_vhcr()
1771 vhcr->op, slave, vhcr->errno, err); mlx4_master_process_vhcr()
1779 ret = mlx4_ACCESS_MEM(dev, outbox->dma, slave, mlx4_master_process_vhcr()
1785 * slave, as it is now in undefined state */ mlx4_master_process_vhcr()
1796 ret = mlx4_ACCESS_MEM(dev, priv->mfunc.vhcr_dma, slave, mlx4_master_process_vhcr()
1797 priv->mfunc.master.slave_state[slave].vhcr_dma, mlx4_master_process_vhcr()
1805 mlx4_GEN_EQE(dev, slave, &priv->mfunc.master.cmd_eqe)) mlx4_master_process_vhcr()
1806 mlx4_warn(dev, "Failed to generate command completion eqe for slave %d\n", mlx4_master_process_vhcr()
1807 slave); mlx4_master_process_vhcr()
1818 int slave, int port) mlx4_master_immediate_activate_vlan_qos()
1827 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; mlx4_master_immediate_activate_vlan_qos()
1828 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_master_immediate_activate_vlan_qos()
1836 if (!(priv->mfunc.master.slave_state[slave].active && mlx4_master_immediate_activate_vlan_qos()
1845 mlx4_dbg(dev, "updating immediately admin params slave %d port %d\n", mlx4_master_immediate_activate_vlan_qos()
1846 slave, port); mlx4_master_immediate_activate_vlan_qos()
1863 "No vlan resources slave %d, port %d\n", mlx4_master_immediate_activate_vlan_qos()
1864 slave, port); mlx4_master_immediate_activate_vlan_qos()
1872 "alloc vlan %d idx %d slave %d port %d\n", mlx4_master_immediate_activate_vlan_qos()
1874 admin_vlan_ix, slave, port); mlx4_master_immediate_activate_vlan_qos()
1896 /* iterate over QPs owned by this slave, using UPDATE_QP */ mlx4_master_immediate_activate_vlan_qos()
1898 work->slave = slave; mlx4_master_immediate_activate_vlan_qos()
1968 static int mlx4_master_activate_admin_state(struct mlx4_priv *priv, int slave) mlx4_master_activate_admin_state() argument
1974 &priv->dev, slave); mlx4_master_activate_admin_state()
1983 priv->mfunc.master.vf_oper[slave].smi_enabled[port] = mlx4_master_activate_admin_state()
1984 priv->mfunc.master.vf_admin[slave].enable_smi[port]; mlx4_master_activate_admin_state()
1985 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; mlx4_master_activate_admin_state()
1986 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_master_activate_admin_state()
1994 "No vlan resources slave %d, port %d\n", mlx4_master_activate_admin_state()
1995 slave, port); mlx4_master_activate_admin_state()
1998 mlx4_dbg(&priv->dev, "alloc vlan %d idx %d slave %d port %d\n", mlx4_master_activate_admin_state()
2000 vp_oper->vlan_idx, slave, port); mlx4_master_activate_admin_state()
2010 "No mac resources slave %d, port %d\n", mlx4_master_activate_admin_state()
2011 slave, port); mlx4_master_activate_admin_state()
2014 mlx4_dbg(&priv->dev, "alloc mac %llx idx %d slave %d port %d\n", mlx4_master_activate_admin_state()
2015 vp_oper->state.mac, vp_oper->mac_idx, slave, port); mlx4_master_activate_admin_state()
2021 static void mlx4_master_deactivate_admin_state(struct mlx4_priv *priv, int slave) mlx4_master_deactivate_admin_state() argument
2026 &priv->dev, slave); mlx4_master_deactivate_admin_state()
2036 priv->mfunc.master.vf_oper[slave].smi_enabled[port] = mlx4_master_deactivate_admin_state()
2038 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; mlx4_master_deactivate_admin_state()
2052 static void mlx4_master_do_cmd(struct mlx4_dev *dev, int slave, u8 cmd, mlx4_master_do_cmd() argument
2062 slave_state[slave].comm_toggle ^= 1; mlx4_master_do_cmd()
2063 reply = (u32) slave_state[slave].comm_toggle << 31; mlx4_master_do_cmd()
2064 if (toggle != slave_state[slave].comm_toggle) { mlx4_master_do_cmd()
2065 mlx4_warn(dev, "Incorrect toggle %d from slave %d. *** MASTER STATE COMPROMISED ***\n", mlx4_master_do_cmd()
2066 toggle, slave); mlx4_master_do_cmd()
2070 mlx4_warn(dev, "Received reset from slave:%d\n", slave); mlx4_master_do_cmd()
2071 slave_state[slave].active = false; mlx4_master_do_cmd()
2072 slave_state[slave].old_vlan_api = false; mlx4_master_do_cmd()
2073 mlx4_master_deactivate_admin_state(priv, slave); mlx4_master_do_cmd()
2075 slave_state[slave].event_eq[i].eqn = -1; mlx4_master_do_cmd()
2076 slave_state[slave].event_eq[i].token = 0; mlx4_master_do_cmd()
2079 if so return "retry" status to the slave*/ mlx4_master_do_cmd()
2080 if (MLX4_COMM_CMD_FLR == slave_state[slave].last_cmd) mlx4_master_do_cmd()
2083 mlx4_dispatch_event(dev, MLX4_DEV_EVENT_SLAVE_SHUTDOWN, slave); mlx4_master_do_cmd()
2090 /*command from slave in the middle of FLR*/ mlx4_master_do_cmd()
2092 MLX4_COMM_CMD_FLR == slave_state[slave].last_cmd) { mlx4_master_do_cmd()
2093 mlx4_warn(dev, "slave:%d is Trying to run cmd(0x%x) in the middle of FLR\n", mlx4_master_do_cmd()
2094 slave, cmd); mlx4_master_do_cmd()
2100 if (slave_state[slave].last_cmd != MLX4_COMM_CMD_RESET) mlx4_master_do_cmd()
2102 slave_state[slave].vhcr_dma = ((u64) param) << 48; mlx4_master_do_cmd()
2103 priv->mfunc.master.slave_state[slave].cookie = 0; mlx4_master_do_cmd()
2106 if (slave_state[slave].last_cmd != MLX4_COMM_CMD_VHCR0) mlx4_master_do_cmd()
2108 slave_state[slave].vhcr_dma |= ((u64) param) << 32; mlx4_master_do_cmd()
2111 if (slave_state[slave].last_cmd != MLX4_COMM_CMD_VHCR1) mlx4_master_do_cmd()
2113 slave_state[slave].vhcr_dma |= ((u64) param) << 16; mlx4_master_do_cmd()
2116 if (slave_state[slave].last_cmd != MLX4_COMM_CMD_VHCR2) mlx4_master_do_cmd()
2118 slave_state[slave].vhcr_dma |= param; mlx4_master_do_cmd()
2119 if (mlx4_master_activate_admin_state(priv, slave)) mlx4_master_do_cmd()
2121 slave_state[slave].active = true; mlx4_master_do_cmd()
2122 mlx4_dispatch_event(dev, MLX4_DEV_EVENT_SLAVE_INIT, slave); mlx4_master_do_cmd()
2125 if ((slave_state[slave].last_cmd != MLX4_COMM_CMD_VHCR_EN) && mlx4_master_do_cmd()
2126 (slave_state[slave].last_cmd != MLX4_COMM_CMD_VHCR_POST)) { mlx4_master_do_cmd()
2127 mlx4_warn(dev, "slave:%d is out of sync, cmd=0x%x, last command=0x%x, reset is needed\n", mlx4_master_do_cmd()
2128 slave, cmd, slave_state[slave].last_cmd); mlx4_master_do_cmd()
2133 if (mlx4_master_process_vhcr(dev, slave, NULL)) { mlx4_master_do_cmd()
2134 mlx4_err(dev, "Failed processing vhcr for slave:%d, resetting slave\n", mlx4_master_do_cmd()
2135 slave); mlx4_master_do_cmd()
2142 mlx4_warn(dev, "Bad comm cmd:%d from slave:%d\n", cmd, slave); mlx4_master_do_cmd()
2146 if (!slave_state[slave].is_slave_going_down) mlx4_master_do_cmd()
2147 slave_state[slave].last_cmd = cmd; mlx4_master_do_cmd()
2152 mlx4_warn(dev, "Slave is going down aborting command(%d) executing from slave:%d\n", mlx4_master_do_cmd()
2153 cmd, slave); mlx4_master_do_cmd()
2157 &priv->mfunc.comm[slave].slave_read); mlx4_master_do_cmd()
2163 /* cleanup any slave resources */ mlx4_master_do_cmd()
2165 mlx4_delete_all_resources_for_slave(dev, slave); mlx4_master_do_cmd()
2168 mlx4_warn(dev, "Turn on internal error to force reset, slave=%d, cmd=0x%x\n", mlx4_master_do_cmd()
2169 slave, cmd); mlx4_master_do_cmd()
2170 /* Turn on internal error letting slave reset itself immeditaly, mlx4_master_do_cmd()
2177 if (!slave_state[slave].is_slave_going_down) mlx4_master_do_cmd()
2178 slave_state[slave].last_cmd = MLX4_COMM_CMD_RESET; mlx4_master_do_cmd()
2180 /*with slave in the middle of flr, no need to clean resources again.*/ mlx4_master_do_cmd()
2182 memset(&slave_state[slave].event_eq, 0, mlx4_master_do_cmd()
2185 &priv->mfunc.comm[slave].slave_read); mlx4_master_do_cmd()
2204 int i, j, slave; mlx4_master_comm_channel() local
2217 slave = (i * 32) + j; mlx4_master_comm_channel()
2219 &mfunc->comm[slave].slave_write)); mlx4_master_comm_channel()
2220 slt = swab32(readl(&mfunc->comm[slave].slave_read)) mlx4_master_comm_channel()
2224 if (master->slave_state[slave].comm_toggle mlx4_master_comm_channel()
2226 pr_info("slave %d out of sync. read toggle %d, state toggle %d. Resynching.\n", mlx4_master_comm_channel()
2227 slave, slt, mlx4_master_comm_channel()
2228 master->slave_state[slave].comm_toggle); mlx4_master_comm_channel()
2229 master->slave_state[slave].comm_toggle = mlx4_master_comm_channel()
2232 mlx4_master_do_cmd(dev, slave, mlx4_master_comm_channel()
2491 int slave; mlx4_report_internal_err_comm_event() local
2497 for (slave = 0; slave < dev->num_slaves; slave++) { mlx4_report_internal_err_comm_event()
2498 slave_read = swab32(readl(&priv->mfunc.comm[slave].slave_read)); mlx4_report_internal_err_comm_event()
2501 &priv->mfunc.comm[slave].slave_read); mlx4_report_internal_err_comm_event()
2664 int mlx4_get_vf_indx(struct mlx4_dev *dev, int slave) mlx4_get_vf_indx() argument
2666 if (slave < 1 || slave > dev->persist->num_vfs) { mlx4_get_vf_indx()
2668 "Bad slave number:%d (number of activated slaves: %lu)\n", mlx4_get_vf_indx()
2669 slave, dev->num_slaves); mlx4_get_vf_indx()
2672 return slave - 1; mlx4_get_vf_indx()
2694 struct mlx4_active_ports mlx4_get_active_ports(struct mlx4_dev *dev, int slave) mlx4_get_active_ports() argument
2701 if (slave == 0) { mlx4_get_active_ports()
2706 vf = mlx4_get_vf_indx(dev, slave); mlx4_get_active_ports()
2711 min((int)dev->dev_vfs[mlx4_get_vf_indx(dev, slave)].n_ports, mlx4_get_active_ports()
2718 int mlx4_slave_convert_port(struct mlx4_dev *dev, int slave, int port) mlx4_slave_convert_port() argument
2721 struct mlx4_active_ports actv_ports = mlx4_get_active_ports(dev, slave); mlx4_slave_convert_port()
2735 int mlx4_phys_to_slave_port(struct mlx4_dev *dev, int slave, int port) mlx4_phys_to_slave_port() argument
2737 struct mlx4_active_ports actv_ports = mlx4_get_active_ports(dev, slave); mlx4_phys_to_slave_port()
2789 static int mlx4_slaves_closest_port(struct mlx4_dev *dev, int slave, int port) mlx4_slaves_closest_port() argument
2791 struct mlx4_active_ports actv_ports = mlx4_get_active_ports(dev, slave); mlx4_slaves_closest_port()
2805 static int mlx4_set_vport_qos(struct mlx4_priv *priv, int slave, int port, mlx4_set_vport_qos() argument
2817 if (slave > port_qos->num_of_qos_vfs) { mlx4_set_vport_qos()
2842 err = mlx4_SET_VPORT_QOS_set(dev, port, slave, vpp_qos); mlx4_set_vport_qos()
2844 mlx4_info(dev, "Failed to set Vport %d QoS values\n", slave); mlx4_set_vport_qos()
2906 int slave; mlx4_set_vf_mac() local
2911 slave = mlx4_get_slave_indx(dev, vf); mlx4_set_vf_mac()
2912 if (slave < 0) mlx4_set_vf_mac()
2915 port = mlx4_slaves_closest_port(dev, slave, port); mlx4_set_vf_mac()
2916 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_set_vf_mac()
2929 int slave; mlx4_set_vf_vlan() local
2938 slave = mlx4_get_slave_indx(dev, vf); mlx4_set_vf_vlan()
2939 if (slave < 0) mlx4_set_vf_vlan()
2942 port = mlx4_slaves_closest_port(dev, slave, port); mlx4_set_vf_vlan()
2943 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_set_vf_vlan()
2959 vf_admin->qos_vport = slave; mlx4_set_vf_vlan()
2961 if (mlx4_master_immediate_activate_vlan_qos(priv, slave, port)) mlx4_set_vf_vlan()
2973 int slave; mlx4_set_vf_rate() local
2986 slave = mlx4_get_slave_indx(dev, vf); mlx4_set_vf_rate()
2987 if (slave < 0) mlx4_set_vf_rate()
2990 port = mlx4_slaves_closest_port(dev, slave, port); mlx4_set_vf_rate()
2991 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_set_vf_rate()
2993 err = mlx4_set_vport_qos(priv, slave, port, max_tx_rate); mlx4_set_vf_rate()
3022 vf_admin->qos_vport = max_tx_rate ? slave : MLX4_VPP_DEFAULT_VPORT; mlx4_set_vf_rate()
3024 if (priv->mfunc.master.slave_state[slave].active && mlx4_set_vf_rate()
3026 mlx4_master_immediate_activate_vlan_qos(priv, slave, port); mlx4_set_vf_rate()
3036 bool mlx4_get_slave_default_vlan(struct mlx4_dev *dev, int port, int slave, mlx4_get_slave_default_vlan() argument
3043 port = mlx4_slaves_closest_port(dev, slave, port); mlx4_get_slave_default_vlan()
3044 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; mlx4_get_slave_default_vlan()
3061 int slave; mlx4_set_vf_spoofchk() local
3067 slave = mlx4_get_slave_indx(dev, vf); mlx4_set_vf_spoofchk()
3068 if (slave < 0) mlx4_set_vf_spoofchk()
3071 port = mlx4_slaves_closest_port(dev, slave, port); mlx4_set_vf_spoofchk()
3072 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_set_vf_spoofchk()
3083 int slave; mlx4_get_vf_config() local
3088 slave = mlx4_get_slave_indx(dev, vf); mlx4_get_vf_config()
3089 if (slave < 0) mlx4_get_vf_config()
3092 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_get_vf_config()
3123 int slave; mlx4_set_vf_link_state() local
3126 slave = mlx4_get_slave_indx(dev, vf); mlx4_set_vf_link_state()
3127 if (slave < 0) mlx4_set_vf_link_state()
3130 port = mlx4_slaves_closest_port(dev, slave, port); mlx4_set_vf_link_state()
3149 mlx4_warn(dev, "unknown value for link_state %02x on slave %d port %d\n", mlx4_set_vf_link_state()
3150 link_state, slave, port); mlx4_set_vf_link_state()
3153 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; mlx4_set_vf_link_state()
3157 mlx4_gen_port_state_change_eqe(dev, slave, port, link_stat_event); mlx4_set_vf_link_state()
3159 if (mlx4_master_immediate_activate_vlan_qos(priv, slave, port)) mlx4_set_vf_link_state()
3167 int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port) mlx4_vf_smi_enabled() argument
3171 if (slave < 1 || slave >= dev->num_slaves || mlx4_vf_smi_enabled()
3175 return priv->mfunc.master.vf_oper[slave].smi_enabled[port] == mlx4_vf_smi_enabled()
3180 int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port) mlx4_vf_get_enable_smi_admin() argument
3184 if (slave == mlx4_master_func_num(dev)) mlx4_vf_get_enable_smi_admin()
3187 if (slave < 1 || slave >= dev->num_slaves || mlx4_vf_get_enable_smi_admin()
3191 return priv->mfunc.master.vf_admin[slave].enable_smi[port] == mlx4_vf_get_enable_smi_admin()
3196 int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, mlx4_vf_set_enable_smi_admin() argument
3201 if (slave == mlx4_master_func_num(dev)) mlx4_vf_set_enable_smi_admin()
3204 if (slave < 1 || slave >= dev->num_slaves || mlx4_vf_set_enable_smi_admin()
3209 priv->mfunc.master.vf_admin[slave].enable_smi[port] = enabled; mlx4_vf_set_enable_smi_admin()
798 mlx4_ACCESS_MEM(struct mlx4_dev *dev, u64 master_addr, int slave, u64 slave_addr, int size, int is_read) mlx4_ACCESS_MEM() argument
1817 mlx4_master_immediate_activate_vlan_qos(struct mlx4_priv *priv, int slave, int port) mlx4_master_immediate_activate_vlan_qos() argument
H A Deq.c147 u8 slave; mlx4_gen_slave_eqe() local
152 slave = eqe->slave_id; mlx4_gen_slave_eqe()
155 if (slave == ALL_SLAVES) { mlx4_gen_slave_eqe()
158 mlx4_warn(dev, "Failed to generate event for slave %d\n", mlx4_gen_slave_eqe()
162 if (mlx4_GEN_EQE(dev, slave, eqe)) mlx4_gen_slave_eqe()
163 mlx4_warn(dev, "Failed to generate event for slave %d\n", mlx4_gen_slave_eqe()
164 slave); mlx4_gen_slave_eqe()
171 static void slave_event(struct mlx4_dev *dev, u8 slave, struct mlx4_eqe *eqe) slave_event() argument
182 mlx4_warn(dev, "Master failed to generate an EQE for slave: %d. No free EQE on slave events queue\n", slave_event()
183 slave); slave_event()
189 s_eqe->slave_id = slave; slave_event()
200 static void mlx4_slave_event(struct mlx4_dev *dev, int slave, mlx4_slave_event() argument
205 if (slave < 0 || slave > dev->persist->num_vfs || mlx4_slave_event()
206 slave == dev->caps.function || mlx4_slave_event()
207 !priv->mfunc.master.slave_state[slave].active) mlx4_slave_event()
210 slave_event(dev, slave, eqe); mlx4_slave_event()
213 int mlx4_gen_pkey_eqe(struct mlx4_dev *dev, int slave, u8 port) mlx4_gen_pkey_eqe() argument
218 struct mlx4_slave_state *s_slave = &priv->mfunc.master.slave_state[slave]; mlx4_gen_pkey_eqe()
229 return mlx4_GEN_EQE(dev, slave, &eqe); mlx4_gen_pkey_eqe()
233 int mlx4_gen_guid_change_eqe(struct mlx4_dev *dev, int slave, u8 port) mlx4_gen_guid_change_eqe() argument
237 /*don't send if we don't have the that slave */ mlx4_gen_guid_change_eqe()
238 if (dev->persist->num_vfs < slave) mlx4_gen_guid_change_eqe()
246 return mlx4_GEN_EQE(dev, slave, &eqe); mlx4_gen_guid_change_eqe()
250 int mlx4_gen_port_state_change_eqe(struct mlx4_dev *dev, int slave, u8 port, mlx4_gen_port_state_change_eqe() argument
255 /*don't send if we don't have the that slave */ mlx4_gen_port_state_change_eqe()
256 if (dev->persist->num_vfs < slave) mlx4_gen_port_state_change_eqe()
264 mlx4_dbg(dev, "%s: sending: %d to slave: %d on port: %d\n", __func__, mlx4_gen_port_state_change_eqe()
265 port_subtype_change, slave, port); mlx4_gen_port_state_change_eqe()
266 return mlx4_GEN_EQE(dev, slave, &eqe); mlx4_gen_port_state_change_eqe()
270 enum slave_port_state mlx4_get_slave_port_state(struct mlx4_dev *dev, int slave, u8 port) mlx4_get_slave_port_state() argument
274 struct mlx4_active_ports actv_ports = mlx4_get_active_ports(dev, slave); mlx4_get_slave_port_state()
276 if (slave >= dev->num_slaves || port > dev->caps.num_ports || mlx4_get_slave_port_state()
278 pr_err("%s: Error: asking for slave:%d, port:%d\n", mlx4_get_slave_port_state()
279 __func__, slave, port); mlx4_get_slave_port_state()
282 return s_state[slave].port_state[port]; mlx4_get_slave_port_state()
286 static int mlx4_set_slave_port_state(struct mlx4_dev *dev, int slave, u8 port, mlx4_set_slave_port_state() argument
291 struct mlx4_active_ports actv_ports = mlx4_get_active_ports(dev, slave); mlx4_set_slave_port_state()
293 if (slave >= dev->num_slaves || port > dev->caps.num_ports || mlx4_set_slave_port_state()
295 pr_err("%s: Error: asking for slave:%d, port:%d\n", mlx4_set_slave_port_state()
296 __func__, slave, port); mlx4_set_slave_port_state()
299 s_state[slave].port_state[port] = state; mlx4_set_slave_port_state()
318 and according to the prev state change the slave's port state.
325 int set_and_calc_slave_port_state(struct mlx4_dev *dev, int slave, set_and_calc_slave_port_state() argument
333 struct mlx4_active_ports actv_ports = mlx4_get_active_ports(dev, slave); set_and_calc_slave_port_state()
335 mlx4_get_slave_port_state(dev, slave, port); set_and_calc_slave_port_state()
339 if (slave >= dev->num_slaves || port > dev->caps.num_ports || set_and_calc_slave_port_state()
341 pr_err("%s: Error: asking for slave:%d, port:%d\n", set_and_calc_slave_port_state()
342 __func__, slave, port); set_and_calc_slave_port_state()
346 ctx = &priv->mfunc.master.slave_state[slave]; set_and_calc_slave_port_state()
352 mlx4_set_slave_port_state(dev, slave, port, set_and_calc_slave_port_state()
357 mlx4_set_slave_port_state(dev, slave, port, set_and_calc_slave_port_state()
360 mlx4_set_slave_port_state(dev, slave, port, set_and_calc_slave_port_state()
367 mlx4_set_slave_port_state(dev, slave, port, set_and_calc_slave_port_state()
372 mlx4_set_slave_port_state(dev, slave, port, set_and_calc_slave_port_state()
378 pr_err("%s: BUG!!! UNKNOWN state: slave:%d, port:%d\n", set_and_calc_slave_port_state()
379 __func__, slave, port); set_and_calc_slave_port_state()
382 ret = mlx4_get_slave_port_state(dev, slave, port); set_and_calc_slave_port_state()
428 mlx4_dbg(dev, "mlx4_handle_slave_flr: clean slave: %d\n", mlx4_master_handle_slave_flr()
431 * a slave before mlx4_load_one is done. mlx4_master_handle_slave_flr()
433 * slave resources which weren't allocated yet. mlx4_master_handle_slave_flr()
438 /*return the slave to running mode*/ mlx4_master_handle_slave_flr()
447 mlx4_warn(dev, "Failed to notify FW on FLR done (slave:%d)\n", mlx4_master_handle_slave_flr()
461 int slave = 0; mlx4_eq_int() local
494 /* forward only to slave owning the QP */ mlx4_eq_int()
498 & 0xffffff, &slave); mlx4_eq_int()
500 mlx4_dbg(dev, "QP event %02x(%02x) on EQ %d at index %u: could not get slave id (%d)\n", mlx4_eq_int()
506 if (!ret && slave != dev->caps.function) { mlx4_eq_int()
507 mlx4_slave_event(dev, slave, eqe); mlx4_eq_int()
521 /* forward only to slave owning the SRQ */ mlx4_eq_int()
526 &slave); mlx4_eq_int()
528 mlx4_warn(dev, "SRQ event %02x(%02x) on EQ %d at index %u: could not get slave id (%d)\n", mlx4_eq_int()
533 mlx4_warn(dev, "%s: slave:%d, srq_no:0x%x, event: %02x(%02x)\n", mlx4_eq_int()
534 __func__, slave, mlx4_eq_int()
538 if (!ret && slave != dev->caps.function) { mlx4_eq_int()
539 mlx4_warn(dev, "%s: sending event %02x(%02x) to slave:%d\n", mlx4_eq_int()
541 eqe->subtype, slave); mlx4_eq_int()
542 mlx4_slave_event(dev, slave, eqe); mlx4_eq_int()
574 mlx4_dbg(dev, "%s: Sending MLX4_PORT_CHANGE_SUBTYPE_DOWN to slave: %d, port:%d\n", mlx4_eq_int()
621 /* port-up event will be sent to a slave when the mlx4_eq_int()
622 * slave's alias-guid is set. This is done in alias_GUID.c mlx4_eq_int()
638 & 0xffffff, &slave); mlx4_eq_int()
640 mlx4_dbg(dev, "CQ event %02x(%02x) on EQ %d at index %u: could not get slave id (%d)\n", mlx4_eq_int()
646 if (!ret && slave != dev->caps.function) { mlx4_eq_int()
647 mlx4_slave_event(dev, slave, eqe); mlx4_eq_int()
688 mlx4_dbg(dev, "FLR event for slave: %d\n", flr_slave); mlx4_eq_int()
715 mlx4_dbg(dev, "%s: Sending MLX4_FATAL_WARNING_SUBTYPE_WARMING to slave: %d\n", mlx4_eq_int()
725 mlx4_warn(dev, "Unhandled event FATAL WARNING (%02x), subtype %02x on EQ %d at index %u. owner=%x, nent=0x%x, slave=%x, ownership=%s\n", mlx4_eq_int()
762 mlx4_warn(dev, "Unhandled event %02x(%02x) on EQ %d at index %u. owner=%x, nent=0x%x, slave=%x, ownership=%s\n", mlx4_eq_int()
826 int mlx4_MAP_EQ_wrapper(struct mlx4_dev *dev, int slave, mlx4_MAP_EQ_wrapper() argument
834 priv->mfunc.master.slave_state[slave].event_eq; mlx4_MAP_EQ_wrapper()
841 if (slave == dev->caps.function) mlx4_MAP_EQ_wrapper()
H A Dmlx4.h130 /*The flag indicates that the slave should delay the RESET cmd*/
200 int (*verify)(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr,
202 int (*wrapper)(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr,
545 /* num_of_slave's lists, one per slave */
636 int slave; member in struct:mlx4_vf_immed_vlan_work
951 int mlx4_WRITE_MTT_wrapper(struct mlx4_dev *dev, int slave,
956 int mlx4_SYNC_TPT_wrapper(struct mlx4_dev *dev, int slave,
961 int mlx4_SW2HW_MPT_wrapper(struct mlx4_dev *dev, int slave,
966 int mlx4_HW2SW_MPT_wrapper(struct mlx4_dev *dev, int slave,
971 int mlx4_QUERY_MPT_wrapper(struct mlx4_dev *dev, int slave,
976 int mlx4_SW2HW_EQ_wrapper(struct mlx4_dev *dev, int slave,
981 int mlx4_CONFIG_DEV_wrapper(struct mlx4_dev *dev, int slave,
986 int mlx4_DMA_wrapper(struct mlx4_dev *dev, int slave,
1024 int mlx4_ALLOC_RES_wrapper(struct mlx4_dev *dev, int slave,
1029 int mlx4_FREE_RES_wrapper(struct mlx4_dev *dev, int slave,
1034 int mlx4_MAP_EQ_wrapper(struct mlx4_dev *dev, int slave,
1038 int mlx4_COMM_INT_wrapper(struct mlx4_dev *dev, int slave,
1043 int mlx4_HW2SW_EQ_wrapper(struct mlx4_dev *dev, int slave,
1048 int mlx4_QUERY_EQ_wrapper(struct mlx4_dev *dev, int slave,
1053 int mlx4_SW2HW_CQ_wrapper(struct mlx4_dev *dev, int slave,
1058 int mlx4_HW2SW_CQ_wrapper(struct mlx4_dev *dev, int slave,
1063 int mlx4_QUERY_CQ_wrapper(struct mlx4_dev *dev, int slave,
1068 int mlx4_MODIFY_CQ_wrapper(struct mlx4_dev *dev, int slave,
1073 int mlx4_SW2HW_SRQ_wrapper(struct mlx4_dev *dev, int slave,
1078 int mlx4_HW2SW_SRQ_wrapper(struct mlx4_dev *dev, int slave,
1083 int mlx4_QUERY_SRQ_wrapper(struct mlx4_dev *dev, int slave,
1088 int mlx4_ARM_SRQ_wrapper(struct mlx4_dev *dev, int slave,
1093 int mlx4_GEN_QP_wrapper(struct mlx4_dev *dev, int slave,
1098 int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,
1103 int mlx4_INIT2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,
1108 int mlx4_INIT2RTR_QP_wrapper(struct mlx4_dev *dev, int slave,
1113 int mlx4_RTR2RTS_QP_wrapper(struct mlx4_dev *dev, int slave,
1118 int mlx4_RTS2RTS_QP_wrapper(struct mlx4_dev *dev, int slave,
1123 int mlx4_SQERR2RTS_QP_wrapper(struct mlx4_dev *dev, int slave,
1128 int mlx4_2ERR_QP_wrapper(struct mlx4_dev *dev, int slave,
1133 int mlx4_RTS2SQD_QP_wrapper(struct mlx4_dev *dev, int slave,
1138 int mlx4_SQD2SQD_QP_wrapper(struct mlx4_dev *dev, int slave,
1143 int mlx4_SQD2RTS_QP_wrapper(struct mlx4_dev *dev, int slave,
1148 int mlx4_2RST_QP_wrapper(struct mlx4_dev *dev, int slave,
1153 int mlx4_QUERY_QP_wrapper(struct mlx4_dev *dev, int slave,
1159 int mlx4_GEN_EQE(struct mlx4_dev *dev, int slave, struct mlx4_eqe *eqe);
1215 u64 resource_id, int *slave);
1217 void mlx4_reset_roce_gids(struct mlx4_dev *dev, int slave);
1223 int mlx4_QUERY_FW_wrapper(struct mlx4_dev *dev, int slave,
1228 int mlx4_SET_PORT_wrapper(struct mlx4_dev *dev, int slave,
1233 int mlx4_INIT_PORT_wrapper(struct mlx4_dev *dev, int slave,
1238 int mlx4_CLOSE_PORT_wrapper(struct mlx4_dev *dev, int slave,
1243 int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave,
1248 int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave,
1258 int mlx4_QP_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
1264 int mlx4_UPDATE_QP_wrapper(struct mlx4_dev *dev, int slave,
1270 int mlx4_PROMISC_wrapper(struct mlx4_dev *dev, int slave,
1284 int mlx4_SET_MCAST_FLTR_wrapper(struct mlx4_dev *dev, int slave,
1289 int mlx4_SET_VLAN_FLTR_wrapper(struct mlx4_dev *dev, int slave,
1296 int mlx4_common_dump_eth_stats(struct mlx4_dev *dev, int slave, u32 in_mod,
1298 int mlx4_DUMP_ETH_STATS_wrapper(struct mlx4_dev *dev, int slave,
1303 int mlx4_PKEY_TABLE_wrapper(struct mlx4_dev *dev, int slave,
1308 int mlx4_QUERY_IF_STAT_wrapper(struct mlx4_dev *dev, int slave,
1313 int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
1318 int mlx4_QP_FLOW_STEERING_DETACH_wrapper(struct mlx4_dev *dev, int slave,
1323 int mlx4_ACCESS_REG_wrapper(struct mlx4_dev *dev, int slave,
1363 int mlx4_get_slave_num_gids(struct mlx4_dev *dev, int slave, int port);
1364 /* Returns the VF index of slave */
1365 int mlx4_get_vf_indx(struct mlx4_dev *dev, int slave);
H A Dport.c534 int mlx4_get_slave_num_gids(struct mlx4_dev *dev, int slave, int port) mlx4_get_slave_num_gids() argument
537 int slave_gid = slave; mlx4_get_slave_num_gids()
543 if (slave == 0) mlx4_get_slave_num_gids()
548 actv_ports = mlx4_get_active_ports(dev, slave); mlx4_get_slave_num_gids()
570 int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port) mlx4_get_base_gid_ix() argument
574 int slave_gid = slave; mlx4_get_base_gid_ix()
581 if (slave == 0) mlx4_get_base_gid_ix()
585 actv_ports = mlx4_get_active_ports(dev, slave); mlx4_get_base_gid_ix()
611 static int mlx4_reset_roce_port_gids(struct mlx4_dev *dev, int slave, mlx4_reset_roce_port_gids() argument
619 num_gids = mlx4_get_slave_num_gids(dev, slave, port); mlx4_reset_roce_port_gids()
620 base = mlx4_get_base_gid_ix(dev, slave, port); mlx4_reset_roce_port_gids()
625 /* Zero-out gids belonging to that slave in the port GID table */ mlx4_reset_roce_port_gids()
646 void mlx4_reset_roce_gids(struct mlx4_dev *dev, int slave) mlx4_reset_roce_gids() argument
653 if (slave < 0 || slave > dev->persist->num_vfs) mlx4_reset_roce_gids()
656 actv_ports = mlx4_get_active_ports(dev, slave); mlx4_reset_roce_gids()
678 err = mlx4_reset_roce_port_gids(dev, slave, i + 1, mailbox); mlx4_reset_roce_gids()
680 mlx4_warn(dev, "Could not reset ETH port GID table for slave %d, port %d (%d)\n", mlx4_reset_roce_gids()
681 slave, i + 1, err); mlx4_reset_roce_gids()
689 static int mlx4_common_set_port(struct mlx4_dev *dev, int slave, u32 in_mod, mlx4_common_set_port() argument
695 struct mlx4_slave_state *slave_st = &master->slave_state[slave]; mlx4_common_set_port()
721 if (slave != dev->caps.function && mlx4_common_set_port()
724 mlx4_warn(dev, "denying SET_PORT for slave:%d\n", mlx4_common_set_port()
725 slave); mlx4_common_set_port()
772 * 1. Check no duplicates in gids passed by slave mlx4_common_set_port()
774 num_gids = mlx4_get_slave_num_gids(dev, slave, port); mlx4_common_set_port()
775 base = mlx4_get_base_gid_ix(dev, slave, port); mlx4_common_set_port()
801 continue; /* don't compare to slave's current gids */ mlx4_common_set_port()
813 mlx4_warn(dev, "requested gid entry for slave:%d is a duplicate of gid at index %d\n", mlx4_common_set_port()
814 slave, i); mlx4_common_set_port()
821 /* insert slave GIDs with memcpy, starting at slave's base index */ mlx4_common_set_port()
848 mlx4_warn(dev, "denying SET_PORT Beacon slave:%d\n", slave); mlx4_common_set_port()
854 * slave function capabilities mlx4_common_set_port()
866 /* slave may not set the IS_SM capability for the port */ mlx4_common_set_port()
867 if (slave != mlx4_master_func_num(dev) && mlx4_common_set_port()
878 priv->mfunc.master.slave_state[slave].ib_cap_mask[port]; mlx4_common_set_port()
879 priv->mfunc.master.slave_state[slave].ib_cap_mask[port] = new_cap_mask; mlx4_common_set_port()
887 if (slave != dev->caps.function) mlx4_common_set_port()
900 priv->mfunc.master.slave_state[slave].ib_cap_mask[port] = mlx4_common_set_port()
905 int mlx4_SET_PORT_wrapper(struct mlx4_dev *dev, int slave, mlx4_SET_PORT_wrapper() argument
912 dev, slave, vhcr->in_modifier & 0xFF); mlx4_SET_PORT_wrapper()
920 return mlx4_common_set_port(dev, slave, vhcr->in_modifier, mlx4_SET_PORT_wrapper()
1127 int mlx4_SET_MCAST_FLTR_wrapper(struct mlx4_dev *dev, int slave, mlx4_SET_MCAST_FLTR_wrapper() argument
1147 int mlx4_SET_VLAN_FLTR_wrapper(struct mlx4_dev *dev, int slave, mlx4_SET_VLAN_FLTR_wrapper() argument
1158 int mlx4_common_dump_eth_stats(struct mlx4_dev *dev, int slave, mlx4_common_dump_eth_stats() argument
1166 int mlx4_DUMP_ETH_STATS_wrapper(struct mlx4_dev *dev, int slave, mlx4_DUMP_ETH_STATS_wrapper() argument
1172 if (slave != dev->caps.function) mlx4_DUMP_ETH_STATS_wrapper()
1174 return mlx4_common_dump_eth_stats(dev, slave, mlx4_DUMP_ETH_STATS_wrapper()
1204 /* Calculate a slave_gid which is the slave number in the gid mlx4_get_slave_from_roce_gid()
1205 * table and not a globally unique slave number. mlx4_get_slave_from_roce_gid()
1219 /* Calculate the globally unique slave id */ mlx4_get_slave_from_roce_gid()
1240 /* candidate_slave_gid isn't necessarily the correct slave, but mlx4_get_slave_from_roce_gid()
1242 * ports as the real slave we're looking for. On dual port VF, mlx4_get_slave_from_roce_gid()
1244 * [offset of the current slave from the first dual port VF] + mlx4_get_slave_from_roce_gid()
1255 /* Calculate the real slave number */ mlx4_get_slave_from_roce_gid()
1341 return "invalid I2C slave address"; cable_info_mad_err_str()
1429 /* Some SFP cables do not support i2c slave mlx4_get_module_info()
H A Dfw.c191 int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) mlx4_QUERY_FUNC() argument
213 in_modifier = slave; mlx4_QUERY_FUNC()
246 int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_FUNC_CAP_wrapper() argument
313 mlx4_get_active_ports(dev, slave); mlx4_QUERY_FUNC_CAP_wrapper()
315 dev, slave, vhcr->in_modifier); mlx4_QUERY_FUNC_CAP_wrapper()
327 proxy_qp = dev->phys_caps.base_proxy_sqpn + 8 * slave + port - 1; mlx4_QUERY_FUNC_CAP_wrapper()
332 if (mlx4_vf_smi_enabled(dev, slave, port) && mlx4_QUERY_FUNC_CAP_wrapper()
341 size = dev->phys_caps.base_tunnel_sqpn + 8 * slave + port - 1; mlx4_QUERY_FUNC_CAP_wrapper()
356 mlx4_get_active_ports(dev, slave); mlx4_QUERY_FUNC_CAP_wrapper()
376 size = priv->mfunc.master.res_tracker.res_alloc[RES_QP].quota[slave]; mlx4_QUERY_FUNC_CAP_wrapper()
381 size = priv->mfunc.master.res_tracker.res_alloc[RES_SRQ].quota[slave]; mlx4_QUERY_FUNC_CAP_wrapper()
386 size = priv->mfunc.master.res_tracker.res_alloc[RES_CQ].quota[slave]; mlx4_QUERY_FUNC_CAP_wrapper()
392 mlx4_QUERY_FUNC(dev, &func, slave)) { mlx4_QUERY_FUNC_CAP_wrapper()
410 size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; mlx4_QUERY_FUNC_CAP_wrapper()
415 size = priv->mfunc.master.res_tracker.res_alloc[RES_MTT].quota[slave]; mlx4_QUERY_FUNC_CAP_wrapper()
428 size = dev->caps.reserved_lkey + ((slave << 8) & 0xFF00); mlx4_QUERY_FUNC_CAP_wrapper()
1118 int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_DEV_CAP_wrapper() argument
1145 actv_ports = mlx4_get_active_ports(dev, slave); mlx4_QUERY_DEV_CAP_wrapper()
1236 int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_PORT_wrapper() argument
1248 int port = mlx4_slave_convert_port(dev, slave, mlx4_QUERY_PORT_wrapper()
1271 if (!err && dev->caps.function != slave) { mlx4_QUERY_PORT_wrapper()
1272 def_mac = priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.mac; mlx4_QUERY_PORT_wrapper()
1284 admin_link_state = priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.link_state; mlx4_QUERY_PORT_wrapper()
1294 short_field = mlx4_get_slave_num_gids(dev, slave, port); mlx4_QUERY_PORT_wrapper()
1296 short_field = 1; /* slave max gids */ mlx4_QUERY_PORT_wrapper()
1564 int mlx4_QUERY_FW_wrapper(struct mlx4_dev *dev, int slave, mlx4_QUERY_FW_wrapper() argument
2044 int mlx4_INIT_PORT_wrapper(struct mlx4_dev *dev, int slave, mlx4_INIT_PORT_wrapper() argument
2051 int port = mlx4_slave_convert_port(dev, slave, vhcr->in_modifier); mlx4_INIT_PORT_wrapper()
2057 if (priv->mfunc.master.slave_state[slave].init_port_mask & (1 << port)) mlx4_INIT_PORT_wrapper()
2068 priv->mfunc.master.slave_state[slave].init_port_mask |= (1 << port); mlx4_INIT_PORT_wrapper()
2070 if (slave == mlx4_master_func_num(dev)) { mlx4_INIT_PORT_wrapper()
2071 if (check_qp0_state(dev, slave, port) && mlx4_INIT_PORT_wrapper()
2078 priv->mfunc.master.slave_state[slave].init_port_mask |= (1 << port); mlx4_INIT_PORT_wrapper()
2081 priv->mfunc.master.slave_state[slave].init_port_mask |= (1 << port); mlx4_INIT_PORT_wrapper()
2142 int mlx4_CLOSE_PORT_wrapper(struct mlx4_dev *dev, int slave, mlx4_CLOSE_PORT_wrapper() argument
2149 int port = mlx4_slave_convert_port(dev, slave, vhcr->in_modifier); mlx4_CLOSE_PORT_wrapper()
2155 if (!(priv->mfunc.master.slave_state[slave].init_port_mask & mlx4_CLOSE_PORT_wrapper()
2166 priv->mfunc.master.slave_state[slave].init_port_mask &= ~(1 << port); mlx4_CLOSE_PORT_wrapper()
2169 if (slave == mlx4_master_func_num(dev)) { mlx4_CLOSE_PORT_wrapper()
2176 priv->mfunc.master.slave_state[slave].init_port_mask &= ~(1 << port); mlx4_CLOSE_PORT_wrapper()
2180 priv->mfunc.master.slave_state[slave].init_port_mask &= ~(1 << port); mlx4_CLOSE_PORT_wrapper()
2734 int mlx4_ACCESS_REG_wrapper(struct mlx4_dev *dev, int slave, mlx4_ACCESS_REG_wrapper() argument
2744 if (slave != mlx4_master_func_num(dev) && mlx4_ACCESS_REG_wrapper()
2753 mlx4_slave_convert_port(dev, slave, mlx4_ACCESS_REG_wrapper()
/linux-4.1.27/drivers/net/ethernet/ti/
H A Dnetcp_ethss.c392 /* Some hw stat regs are applicable to slave port only.
400 u32 rx_pause_frames; /* slave */
402 u32 rx_align_code_errors; /* slave */
404 u32 rx_jabber_frames; /* slave */
406 u32 rx_fragments; /* slave */
413 u32 tx_pause_frames; /* slave */
414 u32 tx_deferred_frames; /* slave */
415 u32 tx_collision_frames; /* slave */
416 u32 tx_single_coll_frames; /* slave */
417 u32 tx_mult_coll_frames; /* slave */
418 u32 tx_excessive_collisions; /* slave */
419 u32 tx_late_collisions; /* slave */
420 u32 rx_ipg_error; /* slave 10G only */
421 u32 tx_carrier_sense_errors; /* slave */
689 struct gbe_slave *slave; member in struct:gbe_intf
1482 #define for_each_sec_slave(slave, priv) \
1483 list_for_each_entry((slave), &(priv)->secondary_slaves, slave_list)
1661 if (!gbe_intf->slave) keystone_get_settings()
1666 cmd->port = gbe_intf->slave->phy_port_t; keystone_get_settings()
1686 if (!gbe_intf->slave) keystone_set_settings()
1689 if (cmd->port != gbe_intf->slave->phy_port_t) { keystone_set_settings()
1706 gbe_intf->slave->phy_port_t = cmd->port; keystone_set_settings()
1726 static void gbe_set_slave_mac(struct gbe_slave *slave, gbe_set_slave_mac() argument
1731 writel(mac_hi(ndev->dev_addr), GBE_REG_ADDR(slave, port_regs, sa_hi)); gbe_set_slave_mac()
1732 writel(mac_lo(ndev->dev_addr), GBE_REG_ADDR(slave, port_regs, sa_lo)); gbe_set_slave_mac()
1745 struct gbe_slave *slave, netcp_ethss_link_state_action()
1748 struct phy_device *phy = slave->phy; netcp_ethss_link_state_action()
1752 mac_control = slave->mac_control; netcp_ethss_link_state_action()
1761 writel(mac_control, GBE_REG_ADDR(slave, emac_regs, netcp_ethss_link_state_action()
1764 cpsw_ale_control_set(gbe_dev->ale, slave->port_num, netcp_ethss_link_state_action()
1768 if (ndev && slave->open && netcp_ethss_link_state_action()
1769 slave->link_interface != SGMII_LINK_MAC_PHY && netcp_ethss_link_state_action()
1770 slave->link_interface != XGMII_LINK_MAC_PHY) netcp_ethss_link_state_action()
1773 writel(mac_control, GBE_REG_ADDR(slave, emac_regs, netcp_ethss_link_state_action()
1775 cpsw_ale_control_set(gbe_dev->ale, slave->port_num, netcp_ethss_link_state_action()
1779 slave->link_interface != SGMII_LINK_MAC_PHY && netcp_ethss_link_state_action()
1780 slave->link_interface != XGMII_LINK_MAC_PHY) netcp_ethss_link_state_action()
1788 static bool gbe_phy_link_status(struct gbe_slave *slave) gbe_phy_link_status() argument
1790 return !slave->phy || slave->phy->link; gbe_phy_link_status()
1794 struct gbe_slave *slave, netcp_ethss_update_link_state()
1797 int sp = slave->slave_num; netcp_ethss_update_link_state()
1800 if (!slave->open) netcp_ethss_update_link_state()
1803 if (!SLAVE_LINK_IS_XGMII(slave)) { netcp_ethss_update_link_state()
1813 phy_link_state = gbe_phy_link_status(slave); netcp_ethss_update_link_state()
1816 if (atomic_xchg(&slave->link_state, link_state) != link_state) netcp_ethss_update_link_state()
1817 netcp_ethss_link_state_action(gbe_dev, ndev, slave, netcp_ethss_update_link_state()
1830 netcp_ethss_update_link_state(gbe_intf->gbe_dev, gbe_intf->slave, xgbe_adjust_link()
1843 netcp_ethss_update_link_state(gbe_intf->gbe_dev, gbe_intf->slave, gbe_adjust_link()
1850 struct gbe_slave *slave; gbe_adjust_link_sec_slaves() local
1852 for_each_sec_slave(slave, gbe_dev) gbe_adjust_link_sec_slaves()
1853 netcp_ethss_update_link_state(gbe_dev, slave, NULL); gbe_adjust_link_sec_slaves()
1859 static int gbe_port_reset(struct gbe_slave *slave) gbe_port_reset() argument
1864 writel(SOFT_RESET, GBE_REG_ADDR(slave, emac_regs, soft_reset)); gbe_port_reset()
1868 v = readl(GBE_REG_ADDR(slave, emac_regs, soft_reset)); gbe_port_reset()
1878 static void gbe_port_config(struct gbe_priv *gbe_dev, struct gbe_slave *slave, gbe_port_config() argument
1889 (slave->link_interface >= XGMII_LINK_MAC_PHY)) { gbe_port_config()
1891 xgmii_mode |= (1 << slave->slave_num); gbe_port_config()
1896 rx_maxlen_reg = GBE_REG_ADDR(slave, port_regs, rx_maxlen); gbe_port_config()
1898 rx_maxlen_reg = GBE_REG_ADDR(slave, emac_regs, rx_maxlen); gbe_port_config()
1901 writel(slave->mac_control, GBE_REG_ADDR(slave, emac_regs, mac_control)); gbe_port_config()
1907 struct gbe_slave *slave = intf->slave; gbe_slave_stop() local
1909 gbe_port_reset(slave); gbe_slave_stop()
1911 cpsw_ale_control_set(gbe_dev->ale, slave->port_num, gbe_slave_stop()
1914 1 << slave->port_num, 0, 0); gbe_slave_stop()
1916 if (!slave->phy) gbe_slave_stop()
1919 phy_stop(slave->phy); gbe_slave_stop()
1920 phy_disconnect(slave->phy); gbe_slave_stop()
1921 slave->phy = NULL; gbe_slave_stop()
1924 static void gbe_sgmii_config(struct gbe_priv *priv, struct gbe_slave *slave) gbe_sgmii_config() argument
1929 if ((priv->ss_version == GBE_SS_VERSION_14) && (slave->slave_num >= 2)) gbe_sgmii_config()
1932 if (!SLAVE_LINK_IS_XGMII(slave)) { gbe_sgmii_config()
1933 netcp_sgmii_reset(sgmii_port_regs, slave->slave_num); gbe_sgmii_config()
1934 netcp_sgmii_config(sgmii_port_regs, slave->slave_num, gbe_sgmii_config()
1935 slave->link_interface); gbe_sgmii_config()
1942 struct gbe_slave *slave = gbe_intf->slave; gbe_slave_open() local
1948 gbe_sgmii_config(priv, slave); gbe_slave_open()
1949 gbe_port_reset(slave); gbe_slave_open()
1950 gbe_port_config(priv, slave, priv->rx_packet_max); gbe_slave_open()
1951 gbe_set_slave_mac(slave, gbe_intf); gbe_slave_open()
1953 cpsw_ale_control_set(priv->ale, slave->port_num, gbe_slave_open()
1956 1 << slave->port_num, 0, 0, ALE_MCAST_FWD_2); gbe_slave_open()
1958 if (slave->link_interface == SGMII_LINK_MAC_PHY) { gbe_slave_open()
1961 slave->phy_port_t = PORT_MII; gbe_slave_open()
1962 } else if (slave->link_interface == XGMII_LINK_MAC_PHY) { gbe_slave_open()
1965 slave->phy_port_t = PORT_FIBRE; gbe_slave_open()
1972 slave->phy = of_phy_connect(gbe_intf->ndev, gbe_slave_open()
1973 slave->phy_node, gbe_slave_open()
1976 if (!slave->phy) { gbe_slave_open()
1977 dev_err(priv->dev, "phy not found on slave %d\n", gbe_slave_open()
1978 slave->slave_num); gbe_slave_open()
1982 dev_name(&slave->phy->dev)); gbe_slave_open()
1983 phy_start(slave->phy); gbe_slave_open()
1984 phy_read_status(slave->phy); gbe_slave_open()
2164 struct phy_device *phy = gbe_intf->slave->phy; gbe_ioctl()
2177 struct gbe_slave *slave; netcp_ethss_timer() local
2181 if (!gbe_intf->slave->open) for_each_intf()
2183 netcp_ethss_update_link_state(gbe_dev, gbe_intf->slave, for_each_intf()
2188 for_each_sec_slave(slave, gbe_dev) { for_each_sec_slave()
2189 netcp_ethss_update_link_state(gbe_dev, slave, NULL); for_each_sec_slave()
2218 struct gbe_slave *slave = gbe_intf->slave; gbe_open() local
2219 int port_num = slave->port_num; gbe_open()
2263 slave->open = true; gbe_open()
2264 netcp_ethss_update_link_state(gbe_dev, slave, ndev); gbe_open()
2281 gbe_intf->slave->open = false; gbe_close()
2282 atomic_set(&gbe_intf->slave->link_state, NETCP_LINK_STATE_INVALID); gbe_close()
2286 static int init_slave(struct gbe_priv *gbe_dev, struct gbe_slave *slave, init_slave() argument
2293 if (of_property_read_u32(node, "slave-port", &slave->slave_num)) { init_slave()
2294 dev_err(gbe_dev->dev, "missing slave-port parameter\n"); init_slave()
2299 &slave->link_interface)) { init_slave()
2302 slave->link_interface = SGMII_LINK_MAC_PHY; init_slave()
2305 slave->open = false; init_slave()
2306 slave->phy_node = of_parse_phandle(node, "phy-handle", 0); init_slave()
2307 slave->port_num = gbe_get_slave_port(gbe_dev, slave->slave_num); init_slave()
2309 if (slave->link_interface >= XGMII_LINK_MAC_PHY) init_slave()
2310 slave->mac_control = GBE_DEF_10G_MAC_CONTROL; init_slave()
2312 slave->mac_control = GBE_DEF_1G_MAC_CONTROL; init_slave()
2315 port_reg_num = slave->slave_num; init_slave()
2317 if (slave->slave_num > 1) { init_slave()
2342 slave->port_regs = gbe_dev->switch_regs + port_reg_ofs + init_slave()
2344 slave->emac_regs = gbe_dev->switch_regs + emac_reg_ofs + init_slave()
2345 (emac_reg_blk_sz * slave->slave_num); init_slave()
2348 /* Initialize slave port register offsets */ init_slave()
2349 GBE_SET_REG_OFS(slave, port_regs, port_vlan); init_slave()
2350 GBE_SET_REG_OFS(slave, port_regs, tx_pri_map); init_slave()
2351 GBE_SET_REG_OFS(slave, port_regs, sa_lo); init_slave()
2352 GBE_SET_REG_OFS(slave, port_regs, sa_hi); init_slave()
2353 GBE_SET_REG_OFS(slave, port_regs, ts_ctl); init_slave()
2354 GBE_SET_REG_OFS(slave, port_regs, ts_seq_ltype); init_slave()
2355 GBE_SET_REG_OFS(slave, port_regs, ts_vlan); init_slave()
2356 GBE_SET_REG_OFS(slave, port_regs, ts_ctl_ltype2); init_slave()
2357 GBE_SET_REG_OFS(slave, port_regs, ts_ctl2); init_slave()
2360 GBE_SET_REG_OFS(slave, emac_regs, mac_control); init_slave()
2361 GBE_SET_REG_OFS(slave, emac_regs, soft_reset); init_slave()
2362 GBE_SET_REG_OFS(slave, emac_regs, rx_maxlen); init_slave()
2365 /* Initialize slave port register offsets */ init_slave()
2366 GBENU_SET_REG_OFS(slave, port_regs, port_vlan); init_slave()
2367 GBENU_SET_REG_OFS(slave, port_regs, tx_pri_map); init_slave()
2368 GBENU_SET_REG_OFS(slave, port_regs, sa_lo); init_slave()
2369 GBENU_SET_REG_OFS(slave, port_regs, sa_hi); init_slave()
2370 GBENU_SET_REG_OFS(slave, port_regs, ts_ctl); init_slave()
2371 GBENU_SET_REG_OFS(slave, port_regs, ts_seq_ltype); init_slave()
2372 GBENU_SET_REG_OFS(slave, port_regs, ts_vlan); init_slave()
2373 GBENU_SET_REG_OFS(slave, port_regs, ts_ctl_ltype2); init_slave()
2374 GBENU_SET_REG_OFS(slave, port_regs, ts_ctl2); init_slave()
2375 GBENU_SET_REG_OFS(slave, port_regs, rx_maxlen); init_slave()
2378 GBENU_SET_REG_OFS(slave, emac_regs, mac_control); init_slave()
2379 GBENU_SET_REG_OFS(slave, emac_regs, soft_reset); init_slave()
2382 /* Initialize slave port register offsets */ init_slave()
2383 XGBE_SET_REG_OFS(slave, port_regs, port_vlan); init_slave()
2384 XGBE_SET_REG_OFS(slave, port_regs, tx_pri_map); init_slave()
2385 XGBE_SET_REG_OFS(slave, port_regs, sa_lo); init_slave()
2386 XGBE_SET_REG_OFS(slave, port_regs, sa_hi); init_slave()
2387 XGBE_SET_REG_OFS(slave, port_regs, ts_ctl); init_slave()
2388 XGBE_SET_REG_OFS(slave, port_regs, ts_seq_ltype); init_slave()
2389 XGBE_SET_REG_OFS(slave, port_regs, ts_vlan); init_slave()
2390 XGBE_SET_REG_OFS(slave, port_regs, ts_ctl_ltype2); init_slave()
2391 XGBE_SET_REG_OFS(slave, port_regs, ts_ctl2); init_slave()
2394 XGBE_SET_REG_OFS(slave, emac_regs, mac_control); init_slave()
2395 XGBE_SET_REG_OFS(slave, emac_regs, soft_reset); init_slave()
2396 XGBE_SET_REG_OFS(slave, emac_regs, rx_maxlen); init_slave()
2399 atomic_set(&slave->link_state, NETCP_LINK_STATE_INVALID); init_slave()
2410 struct gbe_slave *slave; init_secondary_ports() local
2414 slave = devm_kzalloc(dev, sizeof(*slave), GFP_KERNEL); for_each_child_of_node()
2415 if (!slave) { for_each_child_of_node()
2422 if (init_slave(gbe_dev, slave, port)) { for_each_child_of_node()
2426 devm_kfree(dev, slave); for_each_child_of_node()
2430 gbe_sgmii_config(gbe_dev, slave); for_each_child_of_node()
2431 gbe_port_reset(slave); for_each_child_of_node()
2432 gbe_port_config(gbe_dev, slave, gbe_dev->rx_packet_max); for_each_child_of_node()
2433 list_add_tail(&slave->slave_list, &gbe_dev->secondary_slaves); for_each_child_of_node()
2435 if ((slave->link_interface == SGMII_LINK_MAC_PHY) || for_each_child_of_node()
2436 (slave->link_interface == XGMII_LINK_MAC_PHY)) for_each_child_of_node()
2439 slave->open = true; for_each_child_of_node()
2459 if (slave->link_interface == SGMII_LINK_MAC_PHY) {
2461 slave->phy_port_t = PORT_MII;
2464 slave->phy_port_t = PORT_FIBRE;
2467 for_each_sec_slave(slave, gbe_dev) { for_each_sec_slave()
2468 if ((slave->link_interface != SGMII_LINK_MAC_PHY) && for_each_sec_slave()
2469 (slave->link_interface != XGMII_LINK_MAC_PHY)) for_each_sec_slave()
2471 slave->phy = for_each_sec_slave()
2473 slave->phy_node, for_each_sec_slave()
2476 if (!slave->phy) { for_each_sec_slave()
2477 dev_err(dev, "phy not found for slave %d\n", for_each_sec_slave()
2478 slave->slave_num); for_each_sec_slave()
2479 slave->phy = NULL; for_each_sec_slave()
2482 dev_name(&slave->phy->dev)); for_each_sec_slave()
2483 phy_start(slave->phy); for_each_sec_slave()
2484 phy_read_status(slave->phy); for_each_sec_slave()
2491 struct gbe_slave *slave; free_secondary_ports() local
2494 slave = first_sec_slave(gbe_dev); free_secondary_ports()
2495 if (!slave) free_secondary_ports()
2497 if (slave->phy) free_secondary_ports()
2498 phy_disconnect(slave->phy); free_secondary_ports()
2499 list_del(&slave->slave_list); free_secondary_ports()
2892 ret = of_property_read_u32(interface, "slave-port", &slave_num); for_each_child_of_node()
2894 dev_err(dev, "missing slave-port parameter, skipping interface configuration for %s\n", for_each_child_of_node()
2906 /* Initialize Secondary slave ports */
2907 secondary_ports = of_get_child_by_name(node, "secondary-slave-ports");
2977 gbe_intf->slave = devm_kzalloc(gbe_dev->dev, gbe_attach()
2978 sizeof(*gbe_intf->slave), gbe_attach()
2980 if (!gbe_intf->slave) { gbe_attach()
2985 if (init_slave(gbe_dev, gbe_intf->slave, node)) { gbe_attach()
2997 if (gbe_intf->slave) gbe_attach()
2998 devm_kfree(gbe_dev->dev, gbe_intf->slave); gbe_attach()
3010 devm_kfree(gbe_intf->dev, gbe_intf->slave); gbe_release()
1743 netcp_ethss_link_state_action(struct gbe_priv *gbe_dev, struct net_device *ndev, struct gbe_slave *slave, int up) netcp_ethss_link_state_action() argument
1793 netcp_ethss_update_link_state(struct gbe_priv *gbe_dev, struct gbe_slave *slave, struct net_device *ndev) netcp_ethss_update_link_state() argument
H A Dcpsw-phy-sel.c39 phy_interface_t phy_mode, int slave);
44 phy_interface_t phy_mode, int slave) cpsw_gmii_sel_am3352()
70 mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6); cpsw_gmii_sel_am3352()
71 mode <<= slave * 2; cpsw_gmii_sel_am3352()
74 if (slave == 0) cpsw_gmii_sel_am3352()
87 phy_interface_t phy_mode, int slave) cpsw_gmii_sel_dra7xx()
113 switch (slave) { cpsw_gmii_sel_dra7xx()
122 dev_err(priv->dev, "invalid slave number...\n"); cpsw_gmii_sel_dra7xx()
143 void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave) cpsw_phy_sel() argument
157 priv->cpsw_phy_sel(priv, phy_mode, slave); cpsw_phy_sel()
43 cpsw_gmii_sel_am3352(struct cpsw_phy_sel_priv *priv, phy_interface_t phy_mode, int slave) cpsw_gmii_sel_am3352() argument
86 cpsw_gmii_sel_dra7xx(struct cpsw_phy_sel_priv *priv, phy_interface_t phy_mode, int slave) cpsw_gmii_sel_dra7xx() argument
H A Dcpsw.h31 u32 slaves; /* number of slave cpgmac ports */
32 u32 active_slave; /* time stamping, ethtool and SIOCGMIIPHY slave */
43 void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave);
44 int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave,
H A Dcpsw.c367 static inline u32 slave_read(struct cpsw_slave *slave, u32 offset) slave_read() argument
369 return __raw_readl(slave->regs + offset); slave_read()
372 static inline void slave_write(struct cpsw_slave *slave, u32 val, u32 offset) slave_write() argument
374 __raw_writel(val, slave->regs + offset); slave_write()
501 struct cpsw_slave *slave; \
507 slave = (priv)->slaves; \
509 (func)(slave++, ##arg); \
534 struct cpsw_slave *slave = priv->slaves + \
537 slave->slave_num); \
540 ALE_VLAN, slave->port_vlan, 0); \
716 struct cpsw_slave *slave = priv->slaves; cpsw_rx_handler() local
721 for (n = priv->data.slaves; n; n--, slave++) cpsw_rx_handler()
722 if (netif_running(slave->ndev)) cpsw_rx_handler()
847 static void cpsw_set_slave_mac(struct cpsw_slave *slave, cpsw_set_slave_mac() argument
850 slave_write(slave, mac_hi(priv->mac_addr), SA_HI); cpsw_set_slave_mac()
851 slave_write(slave, mac_lo(priv->mac_addr), SA_LO); cpsw_set_slave_mac()
854 static void _cpsw_adjust_link(struct cpsw_slave *slave, _cpsw_adjust_link() argument
857 struct phy_device *phy = slave->phy; _cpsw_adjust_link()
864 slave_port = cpsw_get_slave_port(priv, slave->slave_num); _cpsw_adjust_link()
898 if (mac_control != slave->mac_control) { _cpsw_adjust_link()
900 __raw_writel(mac_control, &slave->sliver->mac_control); _cpsw_adjust_link()
903 slave->mac_control = mac_control; _cpsw_adjust_link()
1092 struct cpsw_priv *priv, struct cpsw_slave *slave, cpsw_add_dual_emac_def_ale_entries()
1098 slave_write(slave, slave->port_vlan, CPSW1_PORT_VLAN); cpsw_add_dual_emac_def_ale_entries()
1100 slave_write(slave, slave->port_vlan, CPSW2_PORT_VLAN); cpsw_add_dual_emac_def_ale_entries()
1101 cpsw_ale_add_vlan(priv->ale, slave->port_vlan, port_mask, cpsw_add_dual_emac_def_ale_entries()
1104 port_mask, ALE_VLAN, slave->port_vlan, 0); cpsw_add_dual_emac_def_ale_entries()
1106 priv->host_port, ALE_VLAN | ALE_SECURE, slave->port_vlan); cpsw_add_dual_emac_def_ale_entries()
1109 static void soft_reset_slave(struct cpsw_slave *slave) soft_reset_slave() argument
1113 snprintf(name, sizeof(name), "slave-%d", slave->slave_num); soft_reset_slave()
1114 soft_reset(name, &slave->sliver->soft_reset); soft_reset_slave()
1117 static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv) cpsw_slave_open() argument
1121 soft_reset_slave(slave); cpsw_slave_open()
1124 __raw_writel(RX_PRIORITY_MAPPING, &slave->sliver->rx_pri_map); cpsw_slave_open()
1128 slave_write(slave, TX_PRIORITY_MAPPING, CPSW1_TX_PRI_MAP); cpsw_slave_open()
1133 slave_write(slave, TX_PRIORITY_MAPPING, CPSW2_TX_PRI_MAP); cpsw_slave_open()
1138 __raw_writel(priv->rx_packet_max, &slave->sliver->rx_maxlen); cpsw_slave_open()
1139 cpsw_set_slave_mac(slave, priv); cpsw_slave_open()
1141 slave->mac_control = 0; /* no link yet */ cpsw_slave_open()
1143 slave_port = cpsw_get_slave_port(priv, slave->slave_num); cpsw_slave_open()
1146 cpsw_add_dual_emac_def_ale_entries(priv, slave, slave_port); cpsw_slave_open()
1151 slave->phy = phy_connect(priv->ndev, slave->data->phy_id, cpsw_slave_open()
1152 &cpsw_adjust_link, slave->data->phy_if); cpsw_slave_open()
1153 if (IS_ERR(slave->phy)) { cpsw_slave_open()
1154 dev_err(priv->dev, "phy %s not found on slave %d\n", cpsw_slave_open()
1155 slave->data->phy_id, slave->slave_num); cpsw_slave_open()
1156 slave->phy = NULL; cpsw_slave_open()
1159 slave->phy->phy_id); cpsw_slave_open()
1160 phy_start(slave->phy); cpsw_slave_open()
1163 cpsw_phy_sel(&priv->pdev->dev, slave->phy->interface, cpsw_slave_open()
1164 slave->slave_num); cpsw_slave_open()
1229 static void cpsw_slave_stop(struct cpsw_slave *slave, struct cpsw_priv *priv) cpsw_slave_stop() argument
1233 slave_port = cpsw_get_slave_port(priv, slave->slave_num); cpsw_slave_stop()
1235 if (!slave->phy) cpsw_slave_stop()
1237 phy_stop(slave->phy); cpsw_slave_stop()
1238 phy_disconnect(slave->phy); cpsw_slave_stop()
1239 slave->phy = NULL; cpsw_slave_stop()
1263 /* initialize host and slave ports */ cpsw_ndo_open()
1418 struct cpsw_slave *slave = &priv->slaves[priv->data.active_slave]; cpsw_hwtstamp_v1() local
1422 slave_write(slave, 0, CPSW1_TS_CTL); cpsw_hwtstamp_v1()
1435 slave_write(slave, ts_en, CPSW1_TS_CTL); cpsw_hwtstamp_v1()
1436 slave_write(slave, seq_id, CPSW1_TS_SEQ_LTYPE); cpsw_hwtstamp_v1()
1441 struct cpsw_slave *slave; cpsw_hwtstamp_v2() local
1445 slave = &priv->slaves[priv->emac_port]; cpsw_hwtstamp_v2()
1447 slave = &priv->slaves[priv->data.active_slave]; cpsw_hwtstamp_v2()
1449 ctrl = slave_read(slave, CPSW2_CONTROL); cpsw_hwtstamp_v2()
1474 slave_write(slave, mtype, CPSW2_TS_SEQ_MTYPE); cpsw_hwtstamp_v2()
1475 slave_write(slave, ctrl, CPSW2_CONTROL); cpsw_hwtstamp_v2()
1924 static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv, cpsw_slave_init() argument
1928 int slave_num = slave->slave_num; cpsw_slave_init()
1931 slave->data = data; cpsw_slave_init()
1932 slave->regs = regs + slave_reg_ofs; cpsw_slave_init()
1933 slave->sliver = regs + sliver_reg_ofs; cpsw_slave_init()
1934 slave->port_vlan = data->dual_emac_res_vlan; cpsw_slave_init()
2028 /* This is no slave child node, continue */ for_each_child_of_node()
2029 if (strcmp(slave_node->name, "slave")) for_each_child_of_node()
2034 dev_err(&pdev->dev, "Missing slave[%d] phy_id property\n", i); for_each_child_of_node()
2050 dev_err(&pdev->dev, "Missing or malformed slave[%d] phy-mode property\n", for_each_child_of_node()
2073 dev_err(&pdev->dev, "Using %d as Reserved VLAN for %d slave\n", for_each_child_of_node()
2305 struct cpsw_slave *slave = &priv->slaves[i]; cpsw_probe() local
2306 cpsw_slave_init(slave, priv, slave_offset, sliver_offset); cpsw_probe()
2419 cpsw_err(priv, probe, "error probe slave 2 emac interface\n"); cpsw_probe()
1091 cpsw_add_dual_emac_def_ale_entries( struct cpsw_priv *priv, struct cpsw_slave *slave, u32 slave_port) cpsw_add_dual_emac_def_ale_entries() argument
H A Dcpsw-common.c25 int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave, cpsw_am33xx_cm_get_macid() argument
39 regmap_read(syscon, AM33XX_CTRL_MAC_LO_REG(offset, slave), cpsw_am33xx_cm_get_macid()
41 regmap_read(syscon, AM33XX_CTRL_MAC_HI_REG(offset, slave), cpsw_am33xx_cm_get_macid()
/linux-4.1.27/drivers/net/
H A Deql.c140 static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave);
150 slave_t *slave = list_entry(this, slave_t, list); list_for_each_safe() local
152 if ((slave->dev->flags & IFF_UP) == IFF_UP) { list_for_each_safe()
153 slave->bytes_queued -= slave->priority_Bps; list_for_each_safe()
154 if (slave->bytes_queued < 0) list_for_each_safe()
155 slave->bytes_queued = 0; list_for_each_safe()
157 eql_kill_one_slave(&eql->queue, slave); list_for_each_safe()
211 "remember to turn off Van-Jacobson compression on your slave devices\n"); eql_open()
223 static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave) eql_kill_one_slave() argument
225 list_del(&slave->list); eql_kill_one_slave()
227 slave->dev->flags &= ~IFF_SLAVE; eql_kill_one_slave()
228 dev_put(slave->dev); eql_kill_one_slave()
229 kfree(slave); eql_kill_one_slave()
306 /* Make a pass to set the best slave. */ __eql_schedule_slaves()
309 slave_t *slave = list_entry(this, slave_t, list); list_for_each_safe() local
312 /* Go through the slave list once, updating best_slave list_for_each_safe()
315 bytes_queued = slave->bytes_queued; list_for_each_safe()
316 priority_Bps = slave->priority_Bps; list_for_each_safe()
317 if ((slave->dev->flags & IFF_UP) == IFF_UP) { list_for_each_safe()
323 best_slave = slave; list_for_each_safe()
326 /* We found a dead slave, kill it. */ list_for_each_safe()
327 eql_kill_one_slave(queue, slave); list_for_each_safe()
336 slave_t *slave; eql_slave_xmit() local
340 slave = __eql_schedule_slaves(&eql->queue); eql_slave_xmit()
341 if (slave) { eql_slave_xmit()
342 struct net_device *slave_dev = slave->dev; eql_slave_xmit()
346 slave->bytes_queued += skb->len; eql_slave_xmit()
370 slave_t *slave = list_entry(this, slave_t, list); list_for_each() local
372 if (slave->dev == dev) list_for_each()
373 return slave; list_for_each()
389 static int __eql_insert_slave(slave_queue_t *queue, slave_t *slave) __eql_insert_slave() argument
394 duplicate_slave = __eql_find_slave_dev(queue, slave->dev); __eql_insert_slave()
398 dev_hold(slave->dev); __eql_insert_slave()
399 list_add(&slave->list, &queue->all_slaves); __eql_insert_slave()
401 slave->dev->flags |= IFF_SLAVE; __eql_insert_slave()
422 /* slave is not a master & not already a slave: */ eql_enslave()
468 slave_t *slave = __eql_find_slave_dev(&eql->queue, slave_dev); eql_emancipate() local
469 if (slave) { eql_emancipate()
470 eql_kill_one_slave(&eql->queue, slave); eql_emancipate()
482 slave_t *slave; eql_g_slave_cfg() local
498 slave = __eql_find_slave_dev(&eql->queue, slave_dev); eql_g_slave_cfg()
499 if (slave) { eql_g_slave_cfg()
500 sc.priority = slave->priority; eql_g_slave_cfg()
514 slave_t *slave; eql_s_slave_cfg() local
532 slave = __eql_find_slave_dev(&eql->queue, slave_dev); eql_s_slave_cfg()
533 if (slave) { eql_s_slave_cfg()
534 slave->priority = sc.priority; eql_s_slave_cfg()
535 slave->priority_bps = sc.priority; eql_s_slave_cfg()
536 slave->priority_Bps = sc.priority / 8; eql_s_slave_cfg()
/linux-4.1.27/drivers/net/wan/
H A Ddlci.c197 netdev_start_xmit(skb, dlp->slave, txq, false); dlci_transmit()
211 flp = netdev_priv(dlp->slave); dlci_config()
223 err = (*flp->dlci_conf)(dlp->slave, dev, get); dlci_config()
251 strncpy(ifr->ifr_slave, dlp->slave->name, sizeof(ifr->ifr_slave)); dlci_dev_ioctl()
271 return dev_set_mtu(dlp->slave, new_mtu); dlci_change_mtu()
285 if (!netif_running(dlp->slave)) dlci_open()
288 flp = netdev_priv(dlp->slave); dlci_open()
289 err = (*flp->activate)(dlp->slave, dev); dlci_open()
308 flp = netdev_priv(dlp->slave); dlci_close()
309 err = (*flp->deactivate)(dlp->slave, dev); dlci_close()
316 struct net_device *master, *slave; dlci_add() local
322 /* validate slave device */ dlci_add()
323 slave = dev_get_by_name(&init_net, dlci->devname); dlci_add()
324 if (!slave) dlci_add()
327 if (slave->type != ARPHRD_FRAD || netdev_priv(slave) == NULL) dlci_add()
338 /* make sure same slave not already registered */ dlci_add()
341 if (dlp->slave == slave) { dlci_add()
350 dlp->slave = slave; dlci_add()
353 flp = netdev_priv(slave); dlci_add()
354 err = (*flp->assoc)(slave, master); dlci_add()
373 dev_put(slave); dlci_add()
381 struct net_device *master, *slave; dlci_del() local
387 /* validate slave device */ dlci_del()
411 slave = dlp->slave; dlci_del()
412 flp = netdev_priv(slave); dlci_del()
414 err = (*flp->deassoc)(slave, master); dlci_del()
420 dev_put(slave); dlci_del()
488 /* if slave is unregistering, then cleanup master */ dlci_dev_event()
501 if (dlp->slave == dev) { dlci_dev_event()
504 dev_put(dlp->slave); dlci_dev_event()
536 dev_put(dlp->slave); dlci_exit()
H A Dsdla.c512 static int sdla_activate(struct net_device *slave, struct net_device *master) sdla_activate() argument
517 flp = netdev_priv(slave); sdla_activate()
528 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE)) sdla_activate()
529 sdla_cmd(slave, SDLA_ACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL); sdla_activate()
534 static int sdla_deactivate(struct net_device *slave, struct net_device *master) sdla_deactivate() argument
539 flp = netdev_priv(slave); sdla_deactivate()
550 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE)) sdla_deactivate()
551 sdla_cmd(slave, SDLA_DEACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL); sdla_deactivate()
556 static int sdla_assoc(struct net_device *slave, struct net_device *master) sdla_assoc() argument
564 flp = netdev_priv(slave); sdla_assoc()
580 master->mtu = slave->mtu; sdla_assoc()
582 if (netif_running(slave)) { sdla_assoc()
584 sdla_reconfig(slave); sdla_assoc()
586 sdla_cmd(slave, SDLA_ADD_DLCI, 0, 0, master->dev_addr, sizeof(short), NULL, NULL); sdla_assoc()
592 static int sdla_deassoc(struct net_device *slave, struct net_device *master) sdla_deassoc() argument
597 flp = netdev_priv(slave); sdla_deassoc()
610 if (netif_running(slave)) { sdla_deassoc()
612 sdla_reconfig(slave); sdla_deassoc()
614 sdla_cmd(slave, SDLA_DELETE_DLCI, 0, 0, master->dev_addr, sizeof(short), NULL, NULL); sdla_deassoc()
620 static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, int get) sdla_dlci_conf() argument
627 flp = netdev_priv(slave); sdla_dlci_conf()
640 if (netif_running(slave)) { sdla_dlci_conf()
642 ret = sdla_cmd(slave, SDLA_READ_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, sdla_dlci_conf()
645 ret = sdla_cmd(slave, SDLA_SET_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, sdla_dlci_conf()
/linux-4.1.27/drivers/net/caif/
H A DMakefile6 # SPI slave physical interfaces module
/linux-4.1.27/drivers/atm/
H A Dtonga.h12 #define END_SWAP_BYTE 0x40 /* endian swap on slave byte accesses */
13 #define END_SWAP_WORD 0x20 /* endian swap on slave word accesses */
/linux-4.1.27/include/linux/i2c/
H A Dpxa-i2c.h31 * 13. SADIE 0 (Disables the unit from interrupting on slave addresses
32 * matching its slave address)
35 * 11. SSDIE 0 (Disables interrupts from a slave stop detected, in slave mode)
39 * 7. GCD 1 (Disables i2c unit response to general call messages as a slave)
54 * 9. SAD 1 (Clear slave address detected)
66 struct i2c_slave_client *slave; member in struct:i2c_pxa_platform_data
/linux-4.1.27/arch/mips/include/asm/sn/
H A Dlaunch.h17 * and is used to communicate between the master processor and the slave
21 * corresponding to a target processor that is in a slave loop, then sends
22 * an interrupt to the slave processor. The slave calls the desired
23 * function, then returns to the slave loop. The master may poll or wait
58 * The slave_launch routine turns on the BUSY flag, and the slave loop
70 volatile launch_proc_t call_addr; /* Func. for slave to call */
73 volatile void *stack_addr; /* Stack pointer for slave function */
74 volatile void *gp_addr; /* Global pointer for slave func. */
H A Dnmi.h17 * and is used to communicate between the master processor and the slave
21 * corresponding to a target processor that is in a slave loop, then sends
22 * an interrupt to the slave processor. The slave calls the desired
24 * the slave loop. The master does not wait for the slaves before
56 volatile void *call_addr; /* Routine for slave to call */
/linux-4.1.27/drivers/gpu/drm/rcar-du/
H A Drcar_du_encoder.h33 struct drm_encoder_slave slave; member in struct:rcar_du_encoder
40 container_of(e, struct rcar_du_encoder, slave.base)
42 #define rcar_encoder_to_drm_encoder(e) (&(e)->slave.base)
H A Drcar_du_hdmienc.c33 #define to_slave_funcs(e) (to_rcar_encoder(e)->slave.slave_funcs)
135 /* Locate the slave I2C device and driver. */ rcar_du_hdmienc_init()
147 /* Initialize the slave encoder. */ rcar_du_hdmienc_init()
149 ret = driver->encoder_init(i2c_slave, rcdu->ddev, &renc->slave); rcar_du_hdmienc_init()
/linux-4.1.27/drivers/media/usb/dvb-usb/
H A Dm920x.h46 always send the 7-bit slave I2C address as the 7 MSB, followed by
50 0x20: Read a byte from the slave. As opposed to writing a byte to the
51 slave. The slave will normally not produce any data unless you
52 set the R/W bit to 1 when sending the slave's address after the
59 What any other bits might mean, or how to get the slave's ACK/NACK
/linux-4.1.27/drivers/infiniband/hw/mlx4/
H A Dsysfs.c374 int slave; member in struct:mlx4_port
449 if (p->dev->pkeys.virt2phys_pkey[p->slave][p->port_num - 1][tab_attr->index] >= show_port_pkey()
454 p->dev->pkeys.virt2phys_pkey[p->slave] show_port_pkey()
468 if (p->slave == mlx4_master_func_num(p->dev->dev)) store_port_pkey()
478 p->dev->pkeys.virt2phys_pkey[p->slave][p->port_num - 1] store_port_pkey()
480 mlx4_sync_pkey_table(p->dev->dev, p->slave, p->port_num, store_port_pkey()
482 err = mlx4_gen_pkey_eqe(p->dev->dev, p->slave, p->port_num); store_port_pkey()
484 pr_err("mlx4_gen_pkey_eqe failed for slave %d," store_port_pkey()
485 " port %d, index %d\n", p->slave, p->port_num, idx); store_port_pkey()
494 return sprintf(buf, "%d\n", p->slave); show_port_gid_idx()
550 if (mlx4_vf_smi_enabled(p->dev->dev, p->slave, p->port_num)) sysfs_show_smi_enabled()
566 if (mlx4_vf_get_enable_smi_admin(p->dev->dev, p->slave, p->port_num)) sysfs_show_enable_smi_admin()
586 if (mlx4_vf_set_enable_smi_admin(p->dev->dev, p->slave, p->port_num, enable)) sysfs_store_enable_smi_admin()
598 if (is_eth || p->slave == mlx4_master_func_num(p->dev->dev)) add_vf_smi_entries()
631 if (is_eth || p->slave == mlx4_master_func_num(p->dev->dev)) remove_vf_smi_entries()
638 static int add_port(struct mlx4_ib_dev *dev, int port_num, int slave) add_port() argument
652 p->slave = slave; add_port()
655 kobject_get(dev->dev_ports_parent[slave]), add_port()
689 list_add_tail(&p->kobj.entry, &dev->pkeys.pkey_port_list[slave]); add_port()
702 kobject_put(dev->dev_ports_parent[slave]); add_port()
707 static int register_one_pkey_tree(struct mlx4_ib_dev *dev, int slave) register_one_pkey_tree() argument
716 get_name(dev, name, slave, sizeof name); register_one_pkey_tree()
718 dev->pkeys.device_parent[slave] = register_one_pkey_tree()
721 if (!dev->pkeys.device_parent[slave]) { register_one_pkey_tree()
726 INIT_LIST_HEAD(&dev->pkeys.pkey_port_list[slave]); register_one_pkey_tree()
728 dev->dev_ports_parent[slave] = register_one_pkey_tree()
730 kobject_get(dev->pkeys.device_parent[slave])); register_one_pkey_tree()
732 if (!dev->dev_ports_parent[slave]) { register_one_pkey_tree()
737 actv_ports = mlx4_get_active_ports(dev->dev, slave); register_one_pkey_tree()
742 err = add_port(dev, port, slave); register_one_pkey_tree()
750 &dev->pkeys.pkey_port_list[slave], register_one_pkey_tree()
759 kobject_put(dev->dev_ports_parent[slave]); register_one_pkey_tree()
762 kobject_put(dev->pkeys.device_parent[slave]); register_one_pkey_tree()
764 kobject_put(dev->pkeys.device_parent[slave]); register_one_pkey_tree()
786 int slave; unregister_pkey_tree() local
793 for (slave = device->dev->persist->num_vfs; slave >= 0; --slave) { unregister_pkey_tree()
795 &device->pkeys.pkey_port_list[slave], unregister_pkey_tree()
803 kobject_put(device->dev_ports_parent[slave]); unregister_pkey_tree()
805 kobject_put(device->dev_ports_parent[slave]); unregister_pkey_tree()
806 kobject_put(device->pkeys.device_parent[slave]); unregister_pkey_tree()
807 kobject_put(device->pkeys.device_parent[slave]); unregister_pkey_tree()
H A Dmad.c313 int i, ix, slave, err; __propagate_pkey_ev() local
316 for (slave = 0; slave < dev->dev->caps.sqp_demux; slave++) { __propagate_pkey_ev()
317 if (slave == mlx4_master_func_num(dev->dev)) __propagate_pkey_ev()
319 if (!mlx4_is_slave_active(dev->dev, slave)) __propagate_pkey_ev()
328 if (dev->pkeys.virt2phys_pkey[slave][port_num - 1] __propagate_pkey_ev()
330 err = mlx4_gen_pkey_eqe(dev->dev, slave, port_num); __propagate_pkey_ev()
331 pr_debug("propagate_pkey_ev: slave %d," __propagate_pkey_ev()
333 slave, port_num, ix, err); __propagate_pkey_ev()
391 static int mlx4_ib_demux_sa_handler(struct ib_device *ibdev, int port, int slave, mlx4_ib_demux_sa_handler() argument
399 ret = mlx4_ib_mcg_demux_handler(ibdev, port, slave, sa_mad); mlx4_ib_demux_sa_handler()
420 static int find_slave_port_pkey_ix(struct mlx4_ib_dev *dev, int slave, find_slave_port_pkey_ix() argument
427 if (slave == mlx4_master_func_num(dev->dev)) find_slave_port_pkey_ix()
433 if (dev->pkeys.virt2phys_pkey[slave][port - 1][i] == unassigned_pkey_ix) find_slave_port_pkey_ix()
436 pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][i]; find_slave_port_pkey_ix()
461 int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port, mlx4_ib_send_to_slave() argument
483 tun_ctx = dev->sriov.demux[port-1].tun[slave]; mlx4_ib_send_to_slave()
494 /* compute P_Key index to put in tunnel header for slave */ mlx4_ib_send_to_slave()
501 ret = find_slave_port_pkey_ix(dev, slave, port, cached_pkey, &pkey_ix); mlx4_ib_send_to_slave()
506 tun_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][0]; mlx4_ib_send_to_slave()
508 dqpn = dev->dev->phys_caps.base_proxy_sqpn + 8 * slave + port + (dest_qpt * 2) - 1; mlx4_ib_send_to_slave()
510 /* get tunnel tx data buf for slave */ mlx4_ib_send_to_slave()
557 if (mlx4_get_slave_default_vlan(dev->dev, port, slave, &vlan, mlx4_ib_send_to_slave()
615 int slave; mlx4_ib_demux_mad() local
633 if (mlx4_get_slave_from_roce_gid(dev->dev, port, grh->dgid.raw, &slave)) { mlx4_ib_demux_mad()
637 if (slave >= dev->dev->caps.sqp_demux) { mlx4_ib_demux_mad()
638 mlx4_ib_warn(ibdev, "slave id: %d is bigger than allowed:%d\n", mlx4_ib_demux_mad()
639 slave, dev->dev->caps.sqp_demux); mlx4_ib_demux_mad()
646 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); mlx4_ib_demux_mad()
648 pr_debug("failed sending to slave %d via tunnel qp (%d)\n", mlx4_ib_demux_mad()
649 slave, err); mlx4_ib_demux_mad()
654 slave = mlx4_master_func_num(dev->dev); mlx4_ib_demux_mad()
656 /* See if the slave id is encoded in a response mad */ mlx4_ib_demux_mad()
659 slave = *slave_id; mlx4_ib_demux_mad()
660 if (slave != 255) /*255 indicates the dom0*/ mlx4_ib_demux_mad()
666 slave = mlx4_ib_find_real_gid(ibdev, port, grh->dgid.global.interface_id); mlx4_ib_demux_mad()
667 if (slave < 0) { mlx4_ib_demux_mad()
677 if (slave != 255 && slave != mlx4_master_func_num(dev->dev)) { mlx4_ib_demux_mad()
678 if (!mlx4_vf_smi_enabled(dev->dev, slave, port)) mlx4_ib_demux_mad()
682 mlx4_ib_warn(ibdev, "demux QP0. rejecting unsolicited mad for slave %d class 0x%x, method 0x%x\n", mlx4_ib_demux_mad()
683 slave, mad->mad_hdr.mgmt_class, mlx4_ib_demux_mad()
690 if (mlx4_ib_demux_sa_handler(ibdev, port, slave, mlx4_ib_demux_mad()
695 if (mlx4_ib_demux_cm_handler(ibdev, port, &slave, mad)) mlx4_ib_demux_mad()
704 if (slave != mlx4_master_func_num(dev->dev)) { mlx4_ib_demux_mad()
706 "for slave:%d\n", mad->mad_hdr.mgmt_class, slave); mlx4_ib_demux_mad()
710 /*make sure that no slave==255 was not handled yet.*/ mlx4_ib_demux_mad()
711 if (slave >= dev->dev->caps.sqp_demux) { mlx4_ib_demux_mad()
712 mlx4_ib_warn(ibdev, "slave id: %d is bigger than allowed:%d\n", mlx4_ib_demux_mad()
713 slave, dev->dev->caps.sqp_demux); mlx4_ib_demux_mad()
717 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); mlx4_ib_demux_mad()
719 pr_debug("failed sending to slave %d via tunnel qp (%d)\n", mlx4_ib_demux_mad()
720 slave, err); mlx4_ib_demux_mad()
1143 int slave, struct ib_sa_mad *sa_mad) mlx4_ib_multiplex_sa_handler()
1150 ret = mlx4_ib_mcg_multiplex_handler(ibdev, port, slave, sa_mad); mlx4_ib_multiplex_sa_handler()
1158 static int is_proxy_qp0(struct mlx4_ib_dev *dev, int qpn, int slave) is_proxy_qp0() argument
1160 int proxy_start = dev->dev->phys_caps.base_proxy_sqpn + 8 * slave; is_proxy_qp0()
1166 int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port, mlx4_ib_send_to_wire() argument
1194 wire_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][0]; mlx4_ib_send_to_wire()
1198 wire_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][pkey_index]; mlx4_ib_send_to_wire()
1265 static int get_slave_base_gid_ix(struct mlx4_ib_dev *dev, int slave, int port) get_slave_base_gid_ix() argument
1268 return slave; get_slave_base_gid_ix()
1269 return mlx4_get_base_gid_ix(dev->dev, slave, port); get_slave_base_gid_ix()
1272 static void fill_in_real_sgid_index(struct mlx4_ib_dev *dev, int slave, int port, fill_in_real_sgid_index() argument
1276 ah_attr->grh.sgid_index = slave; fill_in_real_sgid_index()
1278 ah_attr->grh.sgid_index += get_slave_base_gid_ix(dev, slave, port); fill_in_real_sgid_index()
1290 int slave; mlx4_ib_multiplex_mad() local
1293 /* Get slave that sent this packet */ mlx4_ib_multiplex_mad()
1301 slave = ((wc->src_qp & ~0x7) - dev->dev->phys_caps.base_proxy_sqpn) / 8; mlx4_ib_multiplex_mad()
1302 if (slave != ctx->slave) { mlx4_ib_multiplex_mad()
1304 "belongs to another slave\n", wc->src_qp); mlx4_ib_multiplex_mad()
1323 "class:%d slave:%d\n", *slave_id, mlx4_ib_multiplex_mad()
1324 tunnel->mad.mad_hdr.mgmt_class, slave); mlx4_ib_multiplex_mad()
1327 *slave_id = slave; mlx4_ib_multiplex_mad()
1336 if (slave != mlx4_master_func_num(dev->dev) && mlx4_ib_multiplex_mad()
1337 !mlx4_vf_smi_enabled(dev->dev, slave, ctx->port)) mlx4_ib_multiplex_mad()
1341 if (mlx4_ib_multiplex_sa_handler(ctx->ib_dev, ctx->port, slave, mlx4_ib_multiplex_mad()
1346 if (mlx4_ib_multiplex_cm_handler(ctx->ib_dev, ctx->port, slave, mlx4_ib_multiplex_mad()
1357 if (slave != mlx4_master_func_num(dev->dev)) { mlx4_ib_multiplex_mad()
1359 "for slave:%d\n", tunnel->mad.mad_hdr.mgmt_class, slave); mlx4_ib_multiplex_mad()
1370 fill_in_real_sgid_index(dev, slave, ctx->port, &ah_attr); mlx4_ib_multiplex_mad()
1372 port = mlx4_slave_convert_port(dev->dev, slave, ah_attr.port_num); mlx4_ib_multiplex_mad()
1378 /* if slave have default vlan use it */ mlx4_ib_multiplex_mad()
1379 mlx4_get_slave_default_vlan(dev->dev, ctx->port, slave, mlx4_ib_multiplex_mad()
1382 mlx4_ib_send_to_wire(dev, slave, ctx->port, mlx4_ib_multiplex_mad()
1383 is_proxy_qp0(dev, wc->src_qp, slave) ? mlx4_ib_multiplex_mad()
1563 ctx->slave, wc.status, wc.wr_id); mlx4_ib_tunnel_comp_worker()
1612 qp_init_attr.slave = ctx->slave; create_pv_sqp()
1637 ret = find_slave_port_pkey_ix(to_mdev(ctx->ib_dev), ctx->slave, create_pv_sqp()
1642 to_mdev(ctx->ib_dev)->pkeys.virt2phys_pkey[ctx->slave][ctx->port - 1][0]; create_pv_sqp()
1730 ctx->slave, wc.status, wc.wr_id); mlx4_ib_sqp_comp_worker()
1744 static int alloc_pv_object(struct mlx4_ib_dev *dev, int slave, int port, alloc_pv_object() argument
1753 "for port %d, slave %d\n", port, slave); alloc_pv_object()
1759 ctx->slave = slave; alloc_pv_object()
1764 static void free_pv_object(struct mlx4_ib_dev *dev, int slave, int port) free_pv_object() argument
1766 if (dev->sriov.demux[port - 1].tun[slave]) { free_pv_object()
1767 kfree(dev->sriov.demux[port - 1].tun[slave]); free_pv_object()
1768 dev->sriov.demux[port - 1].tun[slave] = NULL; free_pv_object()
1772 static int create_pv_resources(struct ib_device *ibdev, int slave, int port, create_pv_resources() argument
1891 static void destroy_pv_resources(struct mlx4_ib_dev *dev, int slave, int port, destroy_pv_resources() argument
1918 static int mlx4_ib_tunnels_update(struct mlx4_ib_dev *dev, int slave, mlx4_ib_tunnels_update() argument
1924 clean_vf_mcast(&dev->sriov.demux[port - 1], slave); mlx4_ib_tunnels_update()
1926 if (slave == mlx4_master_func_num(dev->dev)) mlx4_ib_tunnels_update()
1927 destroy_pv_resources(dev, slave, port, mlx4_ib_tunnels_update()
1930 destroy_pv_resources(dev, slave, port, mlx4_ib_tunnels_update()
1931 dev->sriov.demux[port - 1].tun[slave], 1); mlx4_ib_tunnels_update()
1936 ret = create_pv_resources(&dev->ib_dev, slave, port, 1, mlx4_ib_tunnels_update()
1937 dev->sriov.demux[port - 1].tun[slave]); mlx4_ib_tunnels_update()
1940 if (!ret && slave == mlx4_master_func_num(dev->dev)) mlx4_ib_tunnels_update()
1941 ret = create_pv_resources(&dev->ib_dev, slave, port, 0, mlx4_ib_tunnels_update()
1951 mlx4_ib_tunnels_update(dmxw->dev, dmxw->slave, (int) dmxw->port, mlx4_ib_tunnels_update_work()
1142 mlx4_ib_multiplex_sa_handler(struct ib_device *ibdev, int port, int slave, struct ib_sa_mad *sa_mad) mlx4_ib_multiplex_sa_handler() argument
H A Dcm.c330 mlx4_ib_warn(ibdev, "%s: id{slave: %d, sl_cm_id: 0x%x} Failed to id_map_alloc\n", mlx4_ib_multiplex_cm_handler()
343 pr_debug("id{slave: %d, sl_cm_id: 0x%x} is NULL!\n", mlx4_ib_multiplex_cm_handler()
358 int mlx4_ib_demux_cm_handler(struct ib_device *ibdev, int port, int *slave, mlx4_ib_demux_cm_handler() argument
368 if (!slave) mlx4_ib_demux_cm_handler()
372 *slave = mlx4_ib_find_real_gid(ibdev, port, gid.global.interface_id); mlx4_ib_demux_cm_handler()
373 if (*slave < 0) { mlx4_ib_demux_cm_handler()
389 if (slave) mlx4_ib_demux_cm_handler()
390 *slave = id->slave_id; mlx4_ib_demux_cm_handler()
411 /* slave = -1 ==> all slaves */
412 /* TBD -- call paravirt clean for single slave. Need for slave RESET event */ mlx4_ib_cm_paravirt_clean()
413 void mlx4_ib_cm_paravirt_clean(struct mlx4_ib_dev *dev, int slave) mlx4_ib_cm_paravirt_clean() argument
425 if (slave < 0 || slave == map->slave_id) { mlx4_ib_cm_paravirt_clean()
438 if (slave < 0) { mlx4_ib_cm_paravirt_clean()
449 /* first, move nodes belonging to slave to db remove list */ mlx4_ib_cm_paravirt_clean()
455 if (ent->slave_id == slave) mlx4_ib_cm_paravirt_clean()
466 if (slave == map->slave_id) mlx4_ib_cm_paravirt_clean()
H A Dmcg.c224 static int send_mad_to_slave(int slave, struct mlx4_ib_demux_ctx *ctx, send_mad_to_slave() argument
245 return mlx4_ib_send_to_slave(dev, slave, ctx->port, IB_QPT_GSI, &wc, NULL, mad); send_mad_to_slave()
257 /* fix port GID to be the real one (slave 0) */ send_join_to_wire()
314 static int send_reply_to_slave(int slave, struct mcast_group *group, send_reply_to_slave() argument
341 sa_data->scope_join_state |= (group->func[slave].join_state & 0x0f); send_reply_to_slave()
344 ret = send_mad_to_slave(slave, group->demux, (struct ib_mad *)&mad); send_reply_to_slave()
491 static int join_group(struct mcast_group *group, int slave, u8 join_mask) join_group() argument
496 /* remove bits that slave is already member of, and adjust */ join_group()
497 join_state = join_mask & (~group->func[slave].join_state); join_group()
499 group->func[slave].join_state |= join_state; join_group()
500 if (group->func[slave].state != MCAST_MEMBER && join_state) { join_group()
501 group->func[slave].state = MCAST_MEMBER; join_group()
507 static int leave_group(struct mcast_group *group, int slave, u8 leave_state) leave_group() argument
512 group->func[slave].join_state &= ~leave_state; leave_group()
513 if (!group->func[slave].join_state) { leave_group()
514 group->func[slave].state = MCAST_NOT_MEMBER; leave_group()
520 static int check_leave(struct mcast_group *group, int slave, u8 leave_mask) check_leave() argument
522 if (group->func[slave].state != MCAST_MEMBER) check_leave()
526 if (~group->func[slave].join_state & leave_mask) check_leave()
882 int mlx4_ib_mcg_demux_handler(struct ib_device *ibdev, int port, int slave, mlx4_ib_mcg_demux_handler() argument
899 *(u8 *)(&tid) = (u8)slave; /* in group we kept the modified TID */ mlx4_ib_mcg_demux_handler()
932 int slave, struct ib_sa_mad *sa_mad) mlx4_ib_mcg_multiplex_handler()
952 req->func = slave; mlx4_ib_mcg_multiplex_handler()
963 if (group->func[slave].num_pend_reqs > MAX_PEND_REQS_PER_FUNC) { mlx4_ib_mcg_multiplex_handler()
966 port, slave, MAX_PEND_REQS_PER_FUNC); mlx4_ib_mcg_multiplex_handler()
971 ++group->func[slave].num_pend_reqs; mlx4_ib_mcg_multiplex_handler()
984 port, slave, sa_mad->mad_hdr.method); mlx4_ib_mcg_multiplex_handler()
1195 static int push_deleteing_req(struct mcast_group *group, int slave) push_deleteing_req() argument
1200 if (!group->func[slave].join_state) push_deleteing_req()
1209 if (!list_empty(&group->func[slave].pending)) { push_deleteing_req()
1210 pend_req = list_entry(group->func[slave].pending.prev, struct mcast_req, group_list); push_deleteing_req()
1218 req->func = slave; push_deleteing_req()
1220 ++group->func[slave].num_pend_reqs; push_deleteing_req()
1226 void clean_vf_mcast(struct mlx4_ib_demux_ctx *ctx, int slave) clean_vf_mcast() argument
1237 clear_pending_reqs(group, slave); clean_vf_mcast()
1238 push_deleteing_req(group, slave); clean_vf_mcast()
931 mlx4_ib_mcg_multiplex_handler(struct ib_device *ibdev, int port, int slave, struct ib_sa_mad *sa_mad) mlx4_ib_mcg_multiplex_handler() argument
/linux-4.1.27/drivers/i2c/
H A DMakefile12 obj-$(CONFIG_I2C_SLAVE_EEPROM) += i2c-slave-eeprom.o
H A Di2c-slave-eeprom.c2 * I2C slave mode EEPROM simulator
11 * Because most IP blocks can only detect one I2C slave address anyhow, this
60 * this byte will be actually used. Read Linux I2C slave docs i2c_slave_eeprom_slave_cb()
128 eeprom->bin.attr.name = "slave-eeprom"; i2c_slave_eeprom_probe()
158 { "slave-24c02", 2048 / 8 },
165 .name = "i2c-slave-eeprom",
175 MODULE_DESCRIPTION("I2C slave mode EEPROM simulator");
/linux-4.1.27/arch/um/drivers/
H A Dslip.h11 int slave; member in struct:slip_data
H A Dslip_user.c151 pri->slave = sfd; slip_open()
165 err = os_get_ifname(pri->slave, pri->name); slip_open()
203 err = slip_tramp(argv, pri->slave); slip_close()
208 close(pri->slave); slip_close()
209 pri->slave = -1; slip_close()
227 if (pri->slave < 0) slip_add_addr()
237 if (pri->slave < 0) slip_del_addr()
H A Dslirp_user.c65 pri->slave = fds[1]; slirp_open()
83 close(pri->slave); slirp_close()
85 pri->slave = -1; slirp_close()
H A Dslirp.h23 int slave; member in struct:slirp_data
H A Dslip_kern.c28 spri->slave = -1; slip_init()
/linux-4.1.27/arch/mips/boot/dts/include/dt-bindings/dma/
H A Dnbpfaxi.h14 * Use "#dma-cells = <2>;" with the second integer defining slave DMA flags:
/linux-4.1.27/arch/mips/include/asm/mach-sead3/
H A Dkernel-entry-init.h16 * Do SMP slave processor setup necessary before we can safely execute C code.
/linux-4.1.27/include/linux/platform_data/
H A Dcrypto-atmel.h16 * @dma_slave: DMA slave interface to use in data transfers.
H A Ddma-rcar-audmapp.h30 struct audmapp_slave_config *slave; member in struct:audmapp_pdata
H A Dspi-ep93xx.h18 * struct ep93xx_spi_chip_ops - operation callbacks for SPI slave device
H A Dvideo-mx3fb.h42 * @dma_dev: pointer to the dma-device, used for dma-slave connection
H A Ddma-dw.h19 * struct dw_dma_slave - Controller-specific information about a slave
/linux-4.1.27/arch/powerpc/boot/dts/include/dt-bindings/dma/
H A Dnbpfaxi.h14 * Use "#dma-cells = <2>;" with the second integer defining slave DMA flags:
/linux-4.1.27/arch/arm64/boot/dts/include/dt-bindings/dma/
H A Dnbpfaxi.h14 * Use "#dma-cells = <2>;" with the second integer defining slave DMA flags:
/linux-4.1.27/arch/avr32/mach-at32ap/
H A Dhmatrix.c57 * hmatrix_sfr_set_bits - set bits in a slave's Special Function Register
58 * @slave_id: operate on the SFR belonging to this slave
74 * hmatrix_sfr_set_bits - clear bits in a slave's Special Function Register
75 * @slave_id: operate on the SFR belonging to this slave
/linux-4.1.27/arch/metag/boot/dts/include/dt-bindings/dma/
H A Dnbpfaxi.h14 * Use "#dma-cells = <2>;" with the second integer defining slave DMA flags:
/linux-4.1.27/arch/arm/boot/dts/include/dt-bindings/dma/
H A Dnbpfaxi.h14 * Use "#dma-cells = <2>;" with the second integer defining slave DMA flags:
/linux-4.1.27/sound/usb/usx2y/
H A Dus122l.h15 struct file *slave; member in struct:us122l
/linux-4.1.27/include/dt-bindings/dma/
H A Dnbpfaxi.h14 * Use "#dma-cells = <2>;" with the second integer defining slave DMA flags:
/linux-4.1.27/arch/powerpc/platforms/powermac/
H A Dpic.c301 struct device_node *slave = NULL; pmac_pic_probe_oldstyle() local
317 slave = of_find_node_by_name(NULL, "pci106b,7"); pmac_pic_probe_oldstyle()
318 if (slave) pmac_pic_probe_oldstyle()
327 slave = of_find_node_by_name(master, "mac-io"); pmac_pic_probe_oldstyle()
329 /* Check ordering of master & slave */ pmac_pic_probe_oldstyle()
332 BUG_ON(slave == NULL); pmac_pic_probe_oldstyle()
334 master = slave; pmac_pic_probe_oldstyle()
335 slave = tmp; pmac_pic_probe_oldstyle()
338 /* We found a slave */ pmac_pic_probe_oldstyle()
339 if (slave) pmac_pic_probe_oldstyle()
369 if (slave && !of_address_to_resource(slave, 0, &r)) { pmac_pic_probe_oldstyle()
377 pmac_irq_cascade = irq_of_parse_and_map(slave, 0); pmac_pic_probe_oldstyle()
379 printk(KERN_INFO "irq: Found slave Apple PIC %s for %d irqs" pmac_pic_probe_oldstyle()
380 " cascade: %d\n", slave->full_name, pmac_pic_probe_oldstyle()
383 of_node_put(slave); pmac_pic_probe_oldstyle()
390 if (slave && pmac_irq_cascade != NO_IRQ) pmac_pic_probe_oldstyle()
484 struct device_node *np, *master = NULL, *slave = NULL; pmac_pic_probe_mpic() local
492 else if (slave == NULL) pmac_pic_probe_mpic()
493 slave = of_node_get(np); pmac_pic_probe_mpic()
494 if (master && slave) pmac_pic_probe_mpic()
499 if (master == NULL && slave != NULL) { pmac_pic_probe_mpic()
500 master = slave; pmac_pic_probe_mpic()
501 slave = NULL; pmac_pic_probe_mpic()
521 if (slave) { pmac_pic_probe_mpic()
522 mpic2 = pmac_setup_one_mpic(slave, 0); pmac_pic_probe_mpic()
524 printk(KERN_ERR "Failed to setup slave MPIC\n"); pmac_pic_probe_mpic()
525 of_node_put(slave); pmac_pic_probe_mpic()
/linux-4.1.27/drivers/w1/
H A Dw1_netlink.h44 * @W1_SLAVE_ADD: notification that a slave device was added
45 * @W1_SLAVE_REMOVE: notification that a slave device was removed
49 * @W1_SLAVE_CMD: sends reset, selects the slave, then does a read/write/touch
69 * @id: union holding master bus id (msg.id) and slave device id (id[8]).
92 * enum w1_commands - commands available for master or slave operations
96 * @W1_CMD_SEARCH: initiate a standard search, returns only the slave
101 * @W1_CMD_SLAVE_ADD: adds a slave to the given master,
102 * 8 byte slave id at data[0]
103 * @W1_CMD_SLAVE_REMOVE: removes a slave to the given master,
104 * 8 byte slave id at data[0]
H A Dw1.h26 * struct w1_reg_num - broken out slave device id
71 * struct w1_slave - holds a single slave device on the bus
76 * @reg_num: the slave id in binary
79 * @ttl: decrement per search this slave isn't found, deatch at 0
80 * @master: bus which this slave is on
140 * w1_master* is passed to the slave found callback.
199 * @slave_ttl: number of searches before a slave is timed out
H A Dw1_io.c391 * w1_reset_select_slave() - reset and select a slave
392 * @sl: the slave to select
394 * Resets the bus and then selects the slave by sending either a skip rom
423 * When the workflow with a slave amongst many requires several
427 * resume command. The slave must support the command of course.
429 * If the bus has only one slave, traditionnaly the match ROM is skipped
430 * and a "SKIP ROM" is done for efficiency. On multi-slave busses, this
440 /* This will make only the last matched slave perform a skip ROM. */ w1_reset_resume_command()
/linux-4.1.27/sound/firewire/fireworks/
H A Dfireworks_stream.c209 struct amdtp_stream *master, *slave; snd_efw_stream_start_duplex() local
227 slave = &efw->rx_stream; snd_efw_stream_start_duplex()
231 slave = &efw->tx_stream; snd_efw_stream_start_duplex()
244 if (amdtp_streaming_error(slave)) snd_efw_stream_start_duplex()
245 stop_stream(efw, slave); snd_efw_stream_start_duplex()
256 stop_stream(efw, slave); snd_efw_stream_start_duplex()
262 amdtp_stream_set_sync(sync_mode, master, slave); snd_efw_stream_start_duplex()
277 /* start slave if needed */ snd_efw_stream_start_duplex()
278 if (atomic_read(slave_substreams) > 0 && !amdtp_stream_running(slave)) { snd_efw_stream_start_duplex()
279 err = start_stream(efw, slave, rate); snd_efw_stream_start_duplex()
282 "fail to start AMDTP slave stream:%d\n", err); snd_efw_stream_start_duplex()
293 struct amdtp_stream *master, *slave; snd_efw_stream_stop_duplex() local
297 slave = &efw->tx_stream; snd_efw_stream_stop_duplex()
302 slave = &efw->rx_stream; snd_efw_stream_stop_duplex()
311 stop_stream(efw, slave); snd_efw_stream_stop_duplex()
/linux-4.1.27/net/sched/
H A Dsch_teql.c31 and new qdisc with the same name. To join a slave to the equalizer
45 2. This device puts no limitations on physical slave characteristics
50 3. If the slave requires address resolution, only protocols using
52 Other protocols are still allowed to use the slave device directly,
53 which will not break load balancing, though native slave
298 struct net_device *slave = qdisc_dev(q); teql_master_xmit() local
299 struct netdev_queue *slave_txq = netdev_get_tx_queue(slave, 0); teql_master_xmit()
303 if (netif_xmit_stopped(netdev_get_tx_queue(slave, subq)) || teql_master_xmit()
304 !netif_running(slave)) { teql_master_xmit()
309 switch (teql_resolve(skb, skb_res, slave, slave_txq)) { teql_master_xmit()
315 netdev_start_xmit(skb, slave, slave_txq, false) == teql_master_xmit()
370 struct net_device *slave = qdisc_dev(q); teql_master_open() local
372 if (slave == NULL) teql_master_open()
375 if (slave->mtu < mtu) teql_master_open()
376 mtu = slave->mtu; teql_master_open()
377 if (slave->hard_header_len > LL_MAX_HEADER) teql_master_open()
384 if (!(slave->flags&IFF_POINTOPOINT)) teql_master_open()
386 if (!(slave->flags&IFF_BROADCAST)) teql_master_open()
388 if (!(slave->flags&IFF_MULTICAST)) teql_master_open()
/linux-4.1.27/include/sound/
H A Dcontrol.h192 int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
194 /* optional flags for slave */
198 * snd_ctl_add_slave - Add a virtual slave control
200 * @slave: slave element to add
202 * Add a virtual slave control to the given master element created via
217 snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) snd_ctl_add_slave() argument
219 return _snd_ctl_add_slave(master, slave, 0); snd_ctl_add_slave()
223 * snd_ctl_add_slave_uncached - Add a virtual slave control
225 * @slave: slave element to add
227 * Add a virtual slave control to the given master.
240 struct snd_kcontrol *slave) snd_ctl_add_slave_uncached()
242 return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); snd_ctl_add_slave_uncached()
239 snd_ctl_add_slave_uncached(struct snd_kcontrol *master, struct snd_kcontrol *slave) snd_ctl_add_slave_uncached() argument
H A Datmel-abdac.h17 * @dws: DMA slave interface to use for sound playback.
H A Datmel-ac97c.h21 * @rx_dws: DMA slave interface to use for sound capture.
22 * @tx_dws: DMA slave interface to use for sound playback.
28 * only one feature is required on the board. The slave for playback or capture
H A Ddesignware_i2s.h48 bool (*filter)(struct dma_chan *chan, void *slave);
57 bool (*filter)(struct dma_chan *chan, void *slave);
H A Dspear_spdif.h25 bool (*filter)(struct dma_chan *chan, void *slave);
H A Di2c.h61 struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */
H A Dsoc-dai.h66 * clk and frame slave.
69 #define SND_SOC_DAIFMT_CBS_CFM (2 << 12) /* codec clk slave & FRM master */
70 #define SND_SOC_DAIFMT_CBM_CFS (3 << 12) /* codec clk master & frame slave */
71 #define SND_SOC_DAIFMT_CBS_CFS (4 << 12) /* codec clk & FRM slave */
/linux-4.1.27/drivers/gpu/drm/sti/
H A Dsti_vtg.c83 * @slave: slave vtg
94 struct sti_vtg *slave; member in struct:sti_vtg
117 /* reset slave and then master */ vtg_reset()
118 if (vtg->slave) vtg_reset()
119 vtg_reset(vtg->slave); vtg_reset()
129 if (vtg->slave) vtg_set_mode()
130 vtg_set_mode(vtg->slave, VTG_TYPE_SLAVE_BY_EXT0, mode); vtg_set_mode()
215 if (vtg->slave) sti_vtg_set_config()
216 vtg_enable_irq(vtg->slave); sti_vtg_set_config()
264 if (vtg->slave) sti_vtg_register_client()
265 return sti_vtg_register_client(vtg->slave, nb, crtc_id); sti_vtg_register_client()
274 if (vtg->slave) sti_vtg_unregister_client()
275 return sti_vtg_unregister_client(vtg->slave, nb); sti_vtg_unregister_client()
332 np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0); vtg_probe()
334 vtg->slave = of_vtg_find(np); vtg_probe()
336 if (!vtg->slave) vtg_probe()
/linux-4.1.27/drivers/spi/
H A Dspi-pxa2xx-pci.c133 struct dw_dma_slave *slave = c->tx_param; pxa2xx_spi_pci_probe() local
135 slave->dma_dev = &dma_dev->dev; pxa2xx_spi_pci_probe()
136 slave->src_master = 1; pxa2xx_spi_pci_probe()
137 slave->dst_master = 0; pxa2xx_spi_pci_probe()
141 struct dw_dma_slave *slave = c->rx_param; pxa2xx_spi_pci_probe() local
143 slave->dma_dev = &dma_dev->dev; pxa2xx_spi_pci_probe()
144 slave->src_master = 1; pxa2xx_spi_pci_probe()
145 slave->dst_master = 0; pxa2xx_spi_pci_probe()
H A Dspi-bitbang-txrx.h56 /* setup MSB (to slave) on trailing edge */ bitbang_txrx_be_cpha0()
68 /* sample MSB (from slave) on leading edge */ bitbang_txrx_be_cpha0()
88 /* setup MSB (to slave) on leading edge */ bitbang_txrx_be_cpha1()
101 /* sample MSB (from slave) on trailing edge */ bitbang_txrx_be_cpha1()
/linux-4.1.27/drivers/dma/
H A Dk3dma.c96 struct dma_device slave; member in struct:k3_dma_dev
108 #define to_k3_dma(dmadev) container_of(dmadev, struct k3_dma_dev, slave)
217 dev_warn(d->slave.dev, "DMA ERR\n"); k3_dma_int_handler()
269 list_for_each_entry_safe(c, cn, &d->slave.channels, vc.chan.device_node) { k3_dma_tasklet()
275 dev_dbg(d->slave.dev, "pchan %u: free\n", p->idx); k3_dma_tasklet()
298 dev_dbg(d->slave.dev, "pchan %u: alloc vchan %p\n", pch, &c->vc); k3_dma_tasklet()
393 dev_dbg(d->slave.dev, "vchan %p: issued\n", &c->vc); k3_dma_issue_pending()
398 dev_dbg(d->slave.dev, "vchan %p: nothing to issue\n", &c->vc); k3_dma_issue_pending()
576 dev_dbg(d->slave.dev, "vchan %p: terminate all\n", &c->vc); k3_dma_terminate_all()
605 dev_dbg(d->slave.dev, "vchan %p: pause\n", &c->vc); k3_dma_transfer_pause()
627 dev_dbg(d->slave.dev, "vchan %p: resume\n", &c->vc); k3_dma_transfer_resume()
722 INIT_LIST_HEAD(&d->slave.channels); k3_dma_probe()
723 dma_cap_set(DMA_SLAVE, d->slave.cap_mask); k3_dma_probe()
724 dma_cap_set(DMA_MEMCPY, d->slave.cap_mask); k3_dma_probe()
725 d->slave.dev = &op->dev; k3_dma_probe()
726 d->slave.device_free_chan_resources = k3_dma_free_chan_resources; k3_dma_probe()
727 d->slave.device_tx_status = k3_dma_tx_status; k3_dma_probe()
728 d->slave.device_prep_dma_memcpy = k3_dma_prep_memcpy; k3_dma_probe()
729 d->slave.device_prep_slave_sg = k3_dma_prep_slave_sg; k3_dma_probe()
730 d->slave.device_issue_pending = k3_dma_issue_pending; k3_dma_probe()
731 d->slave.device_config = k3_dma_config; k3_dma_probe()
732 d->slave.device_pause = k3_dma_transfer_pause; k3_dma_probe()
733 d->slave.device_resume = k3_dma_transfer_resume; k3_dma_probe()
734 d->slave.device_terminate_all = k3_dma_terminate_all; k3_dma_probe()
735 d->slave.copy_align = DMA_ALIGN; k3_dma_probe()
749 vchan_init(&c->vc, &d->slave); k3_dma_probe()
761 ret = dma_async_device_register(&d->slave); k3_dma_probe()
779 dma_async_device_unregister(&d->slave); k3_dma_probe()
788 dma_async_device_unregister(&d->slave); k3_dma_remove()
791 list_for_each_entry_safe(c, cn, &d->slave.channels, vc.chan.device_node) { k3_dma_remove()
808 dev_warn(d->slave.dev, k3_dma_suspend_dev()
824 dev_err(d->slave.dev, "clk_prepare_enable failed: %d\n", ret); k3_dma_resume_dev()
H A Ds3c24xx-dma.c215 * @slave: whether this channel is a device (slave) or for memcpy
226 bool slave; member in struct:s3c24xx_dma_chan
234 * @slave: slave engine for this instance
243 struct dma_device slave; member in struct:s3c24xx_dma_engine
270 if (!s3cchan->slave) s3c24xx_dma_phy_valid()
299 if (s3cchan->slave) s3c24xx_dma_get_phy()
401 if (!s3cchan->slave) { s3c24xx_dma_set_runtime_config()
470 if (s3cchan->slave) { s3c24xx_dma_start_next_sg()
502 if (!s3cchan->slave) s3c24xx_dma_start_next_sg()
605 list_for_each_entry(p, &s3cdma->slave.channels, s3c24xx_dma_phy_free()
648 if (!s3cchan->slave) s3c24xx_dma_desc_free()
934 * Individual dma operations are requested by the slave, s3c24xx_dma_prep_dma_cyclic()
1023 * Individual dma operations are requested by the slave, s3c24xx_dma_prep_slave_sg()
1069 * Slave transactions callback to the slave device to allow
1070 * synchronization of slave DMA signals with the DMAC enable
1090 * Initialise the DMAC memcpy/slave channels.
1094 struct dma_device *dmadev, unsigned int channels, bool slave) s3c24xx_dma_init_virtual_channels()
1118 if (slave) { s3c24xx_dma_init_virtual_channels()
1119 chan->slave = true; s3c24xx_dma_init_virtual_channels()
1120 chan->name = kasprintf(GFP_KERNEL, "slave%d", i); s3c24xx_dma_init_virtual_channels()
1136 i, slave ? "slave" : "memcpy"); s3c24xx_dma_init_virtual_channels()
1296 /* Initialize slave engine for SoC internal dedicated peripherals */ s3c24xx_dma_probe()
1297 dma_cap_set(DMA_SLAVE, s3cdma->slave.cap_mask); s3c24xx_dma_probe()
1298 dma_cap_set(DMA_CYCLIC, s3cdma->slave.cap_mask); s3c24xx_dma_probe()
1299 dma_cap_set(DMA_PRIVATE, s3cdma->slave.cap_mask); s3c24xx_dma_probe()
1300 s3cdma->slave.dev = &pdev->dev; s3c24xx_dma_probe()
1301 s3cdma->slave.device_free_chan_resources = s3c24xx_dma_probe()
1303 s3cdma->slave.device_tx_status = s3c24xx_dma_tx_status; s3c24xx_dma_probe()
1304 s3cdma->slave.device_issue_pending = s3c24xx_dma_issue_pending; s3c24xx_dma_probe()
1305 s3cdma->slave.device_prep_slave_sg = s3c24xx_dma_prep_slave_sg; s3c24xx_dma_probe()
1306 s3cdma->slave.device_prep_dma_cyclic = s3c24xx_dma_prep_dma_cyclic; s3c24xx_dma_probe()
1307 s3cdma->slave.device_config = s3c24xx_dma_set_runtime_config; s3c24xx_dma_probe()
1308 s3cdma->slave.device_terminate_all = s3c24xx_dma_terminate_all; s3c24xx_dma_probe()
1320 /* Register slave channels */ s3c24xx_dma_probe()
1321 ret = s3c24xx_dma_init_virtual_channels(s3cdma, &s3cdma->slave, s3c24xx_dma_probe()
1325 "%s failed to enumerate slave channels - %d\n", s3c24xx_dma_probe()
1338 ret = dma_async_device_register(&s3cdma->slave); s3c24xx_dma_probe()
1341 "%s failed to register slave as an async device - %d\n", s3c24xx_dma_probe()
1355 s3c24xx_dma_free_virtual_channels(&s3cdma->slave); s3c24xx_dma_probe()
1376 dma_async_device_unregister(&s3cdma->slave); s3c24xx_dma_remove()
1379 s3c24xx_dma_free_virtual_channels(&s3cdma->slave); s3c24xx_dma_remove()
1093 s3c24xx_dma_init_virtual_channels(struct s3c24xx_dma_engine *s3cdma, struct dma_device *dmadev, unsigned int channels, bool slave) s3c24xx_dma_init_virtual_channels() argument
H A Dsa11x0-dma.c122 struct dma_device slave; member in struct:sa11x0_dma_dev
137 return container_of(dmadev, struct sa11x0_dma_dev, slave); to_sa11x0_dma()
158 dev_vdbg(p->dev->slave.dev, "pchan %u: txd %p[%x]: starting: DDAR:%x\n", sa11x0_dma_start_desc()
220 dev_dbg(p->dev->slave.dev, "pchan %u: load: DCSR:%02x DBS%c:%08x DBT%c:%08x\n", sa11x0_dma_start_sg()
267 dev_dbg(d->slave.dev, "pchan %u: irq: DCSR:%02x\n", p->num, dcsr); sa11x0_dma_irq()
270 dev_err(d->slave.dev, "pchan %u: error. DCSR:%02x DDAR:%08x DBSA:%08x DBTA:%08x DBSB:%08x DBTB:%08x\n", sa11x0_dma_irq()
337 dev_dbg(d->slave.dev, "tasklet enter\n"); sa11x0_dma_tasklet()
339 list_for_each_entry(c, &d->slave.channels, vc.chan.device_node) { sa11x0_dma_tasklet()
346 dev_dbg(d->slave.dev, "pchan %u: free\n", p->num); sa11x0_dma_tasklet()
370 dev_dbg(d->slave.dev, "pchan %u: alloc vchan %p\n", pch, &c->vc); sa11x0_dma_tasklet()
388 dev_dbg(d->slave.dev, "tasklet exit\n"); sa11x0_dma_tasklet()
466 dev_vdbg(d->slave.dev, "tx_status: addr:%x\n", addr); sa11x0_dma_tx_status()
469 dev_vdbg(d->slave.dev, "tx_status: [%u] %x+%x\n", sa11x0_dma_tx_status()
477 dev_vdbg(d->slave.dev, "tx_status: [%u] +%x\n", sa11x0_dma_tx_status()
485 dev_vdbg(d->slave.dev, "tx_status: [%u] %x+%x ++\n", sa11x0_dma_tx_status()
494 dev_vdbg(d->slave.dev, "tx_status: bytes 0x%zx\n", state->residue); sa11x0_dma_tx_status()
517 dev_dbg(d->slave.dev, "vchan %p: issued\n", &c->vc); sa11x0_dma_issue_pending()
522 dev_dbg(d->slave.dev, "vchan %p: nothing to issue\n", &c->vc); sa11x0_dma_issue_pending()
712 dev_dbg(d->slave.dev, "vchan %p: pause\n", &c->vc); sa11x0_dma_device_pause()
739 dev_dbg(d->slave.dev, "vchan %p: resume\n", &c->vc); sa11x0_dma_device_resume()
766 dev_dbg(d->slave.dev, "vchan %p: terminate all\n", &c->vc); sa11x0_dma_device_terminate_all()
773 dev_dbg(d->slave.dev, "pchan %u: terminating\n", p->num); sa11x0_dma_device_terminate_all()
941 dma_cap_set(DMA_SLAVE, d->slave.cap_mask); sa11x0_dma_probe()
942 dma_cap_set(DMA_CYCLIC, d->slave.cap_mask); sa11x0_dma_probe()
943 d->slave.device_prep_slave_sg = sa11x0_dma_prep_slave_sg; sa11x0_dma_probe()
944 d->slave.device_prep_dma_cyclic = sa11x0_dma_prep_dma_cyclic; sa11x0_dma_probe()
945 d->slave.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); sa11x0_dma_probe()
946 d->slave.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; sa11x0_dma_probe()
947 d->slave.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | sa11x0_dma_probe()
949 d->slave.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | sa11x0_dma_probe()
951 ret = sa11x0_dma_init_dmadev(&d->slave, &pdev->dev); sa11x0_dma_probe()
953 dev_warn(d->slave.dev, "failed to register slave async device: %d\n", sa11x0_dma_probe()
962 sa11x0_dma_free_channels(&d->slave); sa11x0_dma_probe()
979 dma_async_device_unregister(&d->slave); sa11x0_dma_remove()
981 sa11x0_dma_free_channels(&d->slave); sa11x0_dma_remove()
H A Dsun6i-dma.c152 struct dma_device slave; member in struct:sun6i_dma_dev
174 return container_of(d, struct sun6i_dma_dev, slave); to_sun6i_dma_dev()
190 dev_dbg(sdev->slave.dev, "Common register:\n" sun6i_dma_dump_com_regs()
208 dev_dbg(sdev->slave.dev, "Chan %d reg: %pa\n" sun6i_dma_dump_chan_regs()
406 list_for_each_entry(vchan, &sdev->slave.channels, vc.chan.device_node) { sun6i_dma_tasklet()
416 dev_dbg(sdev->slave.dev, "pchan %u: free\n", sun6i_dma_tasklet()
444 dev_dbg(sdev->slave.dev, "pchan %u: alloc vchan %p\n", sun6i_dma_tasklet()
476 dev_dbg(sdev->slave.dev, "DMA irq status %s: 0x%x\n", sun6i_dma_interrupt()
529 dev_err(sdev->slave.dev, "Failed to alloc lli memory\n"); sun6i_dma_prep_dma_memcpy()
823 chan = dma_get_any_slave_channel(&sdev->slave); sun6i_dma_of_xlate()
843 devm_free_irq(sdev->slave.dev, sdev->irq, sdev); sun6i_kill_tasklet()
950 dma_cap_set(DMA_PRIVATE, sdc->slave.cap_mask); sun6i_dma_probe()
951 dma_cap_set(DMA_MEMCPY, sdc->slave.cap_mask); sun6i_dma_probe()
952 dma_cap_set(DMA_SLAVE, sdc->slave.cap_mask); sun6i_dma_probe()
954 INIT_LIST_HEAD(&sdc->slave.channels); sun6i_dma_probe()
955 sdc->slave.device_free_chan_resources = sun6i_dma_free_chan_resources; sun6i_dma_probe()
956 sdc->slave.device_tx_status = sun6i_dma_tx_status; sun6i_dma_probe()
957 sdc->slave.device_issue_pending = sun6i_dma_issue_pending; sun6i_dma_probe()
958 sdc->slave.device_prep_slave_sg = sun6i_dma_prep_slave_sg; sun6i_dma_probe()
959 sdc->slave.device_prep_dma_memcpy = sun6i_dma_prep_dma_memcpy; sun6i_dma_probe()
960 sdc->slave.copy_align = 4; sun6i_dma_probe()
961 sdc->slave.device_config = sun6i_dma_config; sun6i_dma_probe()
962 sdc->slave.device_pause = sun6i_dma_pause; sun6i_dma_probe()
963 sdc->slave.device_resume = sun6i_dma_resume; sun6i_dma_probe()
964 sdc->slave.device_terminate_all = sun6i_dma_terminate_all; sun6i_dma_probe()
965 sdc->slave.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | sun6i_dma_probe()
968 sdc->slave.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | sun6i_dma_probe()
971 sdc->slave.directions = BIT(DMA_DEV_TO_MEM) | sun6i_dma_probe()
973 sdc->slave.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; sun6i_dma_probe()
974 sdc->slave.dev = &pdev->dev; sun6i_dma_probe()
1000 vchan_init(&vchan->vc, &sdc->slave); sun6i_dma_probe()
1022 ret = dma_async_device_register(&sdc->slave); sun6i_dma_probe()
1047 dma_async_device_unregister(&sdc->slave); sun6i_dma_probe()
1064 dma_async_device_unregister(&sdc->slave); sun6i_dma_remove()
H A Damba-pl08x.c228 * @slave: whether this channel is a device (slave) or for memcpy
241 bool slave; member in struct:pl08x_dma_chan
248 * @slave: slave engine for this instance
262 struct dma_device slave; member in struct:pl08x_driver_data
701 list_for_each_entry(p, &pl08x->slave.channels, vc.chan.device_node) pl08x_phy_free()
815 * byte data), slave is still not aligned, then its width will be reduced to
1054 * - if slave is not then we must set its width down pl08x_fill_llis_for_desc()
1387 * Slave transactions callback to the slave device to allow
1388 * synchronization of slave DMA signals with the DMAC enable
1520 "DMA slave configuration botched?\n"); pl08x_init_txd()
1673 if (!plchan->slave) pl08x_config()
1709 * Mark physical channel as free and free any slave pl08x_terminate_all()
1873 chan->slave = true; pl08x_dma_slave_init()
1880 * Initialise the DMAC memcpy/slave channels.
1884 struct dma_device *dmadev, unsigned int channels, bool slave) pl08x_dma_init_virtual_channels()
1908 if (slave) { pl08x_dma_init_virtual_channels()
1927 i, slave ? "slave" : "memcpy"); pl08x_dma_init_virtual_channels()
1996 seq_printf(s, "\nPL08x virtual slave channels:\n"); pl08x_debugfs_show()
1999 list_for_each_entry(chan, &pl08x->slave.channels, vc.chan.device_node) { pl08x_debugfs_show()
2074 /* Initialize slave engine */ pl08x_probe()
2075 dma_cap_set(DMA_SLAVE, pl08x->slave.cap_mask); pl08x_probe()
2076 dma_cap_set(DMA_CYCLIC, pl08x->slave.cap_mask); pl08x_probe()
2077 pl08x->slave.dev = &adev->dev; pl08x_probe()
2078 pl08x->slave.device_free_chan_resources = pl08x_free_chan_resources; pl08x_probe()
2079 pl08x->slave.device_prep_dma_interrupt = pl08x_prep_dma_interrupt; pl08x_probe()
2080 pl08x->slave.device_tx_status = pl08x_dma_tx_status; pl08x_probe()
2081 pl08x->slave.device_issue_pending = pl08x_issue_pending; pl08x_probe()
2082 pl08x->slave.device_prep_slave_sg = pl08x_prep_slave_sg; pl08x_probe()
2083 pl08x->slave.device_prep_dma_cyclic = pl08x_prep_dma_cyclic; pl08x_probe()
2084 pl08x->slave.device_config = pl08x_config; pl08x_probe()
2085 pl08x->slave.device_pause = pl08x_pause; pl08x_probe()
2086 pl08x->slave.device_resume = pl08x_resume; pl08x_probe()
2087 pl08x->slave.device_terminate_all = pl08x_terminate_all; pl08x_probe()
2088 pl08x->slave.src_addr_widths = PL80X_DMA_BUSWIDTHS; pl08x_probe()
2089 pl08x->slave.dst_addr_widths = PL80X_DMA_BUSWIDTHS; pl08x_probe()
2090 pl08x->slave.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); pl08x_probe()
2091 pl08x->slave.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; pl08x_probe()
2195 /* Register slave channels */ pl08x_probe()
2196 ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave, pl08x_probe()
2200 "%s failed to enumerate slave channels - %d\n", pl08x_probe()
2213 ret = dma_async_device_register(&pl08x->slave); pl08x_probe()
2216 "%s failed to register slave as an async device - %d\n", pl08x_probe()
2232 pl08x_free_virtual_channels(&pl08x->slave); pl08x_probe()
1883 pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x, struct dma_device *dmadev, unsigned int channels, bool slave) pl08x_dma_init_virtual_channels() argument
/linux-4.1.27/drivers/clk/bcm/
H A Dclk-bcm21664.c237 BCM21664_CCU_COMMON(slave, SLAVE),
244 KONA_CLK(slave, uartb, peri),
246 KONA_CLK(slave, uartb2, peri),
248 KONA_CLK(slave, uartb3, peri),
250 KONA_CLK(slave, bsc1, peri),
252 KONA_CLK(slave, bsc2, peri),
254 KONA_CLK(slave, bsc3, peri),
256 KONA_CLK(slave, bsc4, peri),
H A Dclk-bcm281xx.c313 BCM281XX_CCU_COMMON(slave, SLAVE),
316 KONA_CLK(slave, uartb, peri),
318 KONA_CLK(slave, uartb2, peri),
320 KONA_CLK(slave, uartb3, peri),
322 KONA_CLK(slave, uartb4, peri),
324 KONA_CLK(slave, ssp0, peri),
326 KONA_CLK(slave, ssp2, peri),
328 KONA_CLK(slave, bsc1, peri),
330 KONA_CLK(slave, bsc2, peri),
332 KONA_CLK(slave, bsc3, peri),
334 KONA_CLK(slave, pwm, peri),
/linux-4.1.27/include/linux/
H A Dsudmac.h17 /* Used by slave DMA clients to request DMA to/from a specific peripheral */
38 const struct sudmac_slave_config *slave; member in struct:sudmac_pdata
H A Dshdma-base.h42 * in their respective device, channel, descriptor and slave objects.
71 int slave_id; /* Client ID for slave DMA */
73 int hw_req; /* DMA request line for slave DMA - same
84 * slave_addr: return slave DMA address
86 * set_slave: bind channel to a slave
H A Dspmi.h19 /* Maximum slave identifier */
132 * struct spmi_driver - SPMI slave device driver
138 * If PM runtime support is desired for a slave, a device driver can call
140 * pm_runtime_get() in remove()). PM runtime support for a slave is
141 * implemented by issuing a SLEEP command to the slave on runtime_suspend(),
142 * transitioning the slave into the SLEEP state. On runtime_resume(), a WAKEUP
143 * command is sent to the slave to bring it back to ACTIVE.
H A Dsh_dma.h20 /* Used by slave DMA clients to request DMA to/from a specific peripheral */
54 * @slave: array of slaves
75 const struct sh_dmae_slave_config *slave; member in struct:sh_dmae_pdata
H A Dif_eql.h26 typedef struct slave { struct
/linux-4.1.27/include/linux/hsi/
H A Dssi_protocol.h4 * SSIP slave support header file
34 struct hsi_client *ssip_slave_get_master(struct hsi_client *slave);
/linux-4.1.27/arch/um/os-Linux/
H A Dsigio.c398 int slave; member in struct:openpty_arg
407 if (openpty(&info->master, &info->slave, NULL, NULL, NULL)) openpty_cb()
411 static int async_pty(int master, int slave) async_pty() argument
423 if ((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)) async_pty()
432 struct openpty_arg pty = { .master = -1, .slave = -1 }; check_one_sigio()
433 int master, slave, err; check_one_sigio() local
443 slave = pty.slave; check_one_sigio()
445 if ((master == -1) || (slave == -1)) { check_one_sigio()
459 err = async_pty(master, slave); check_one_sigio()
481 (*proc)(master, slave); check_one_sigio()
484 close(slave); check_one_sigio()
491 static void tty_output(int master, int slave) tty_output() argument
504 while (((n = read(slave, buf, sizeof(buf))) > 0) && tty_output()
517 static void tty_close(int master, int slave) tty_close() argument
522 close(slave); tty_close()
/linux-4.1.27/arch/mips/include/asm/mach-generic/
H A Dkernel-entry-init.h19 * Do SMP slave processor setup necessary before we can savely execute C code.
/linux-4.1.27/drivers/dma/dw/
H A Dplatform.c35 struct dw_dma_slave slave = { dw_dma_of_xlate() local
43 slave.src_id = dma_spec->args[0]; dw_dma_of_xlate()
44 slave.dst_id = dma_spec->args[0]; dw_dma_of_xlate()
45 slave.src_master = dma_spec->args[1]; dw_dma_of_xlate()
46 slave.dst_master = dma_spec->args[2]; dw_dma_of_xlate()
48 if (WARN_ON(slave.src_id >= DW_DMA_MAX_NR_REQUESTS || dw_dma_of_xlate()
49 slave.dst_id >= DW_DMA_MAX_NR_REQUESTS || dw_dma_of_xlate()
50 slave.src_master >= dw->nr_masters || dw_dma_of_xlate()
51 slave.dst_master >= dw->nr_masters)) dw_dma_of_xlate()
58 return dma_request_channel(cap, dw_dma_filter, &slave); dw_dma_of_xlate()
65 struct dw_dma_slave slave = { dw_dma_acpi_filter() local
73 return dw_dma_filter(chan, &slave); dw_dma_acpi_filter()
/linux-4.1.27/drivers/i2c/busses/
H A Di2c-rcar.c40 #define ICSCR 0x00 /* slave ctrl */
42 #define ICSSR 0x08 /* slave status */
44 #define ICSIER 0x10 /* slave irq enable */
47 #define ICSAR 0x1C /* slave address */
52 #define SDBS (1 << 3) /* slave data buffer select */
53 #define SIE (1 << 2) /* slave interface enable */
69 #define STM (1 << 5) /* slave transmit mode */
71 #define SDE (1 << 3) /* slave data empty */
72 #define SDT (1 << 2) /* slave data transmitted */
73 #define SDR (1 << 1) /* slave data received */
74 #define SAR (1 << 0) /* slave addr received */
83 #define MAT (1 << 0) /* slave addr xfer done */
121 struct i2c_client *slave; member in struct:rcar_i2c_priv
385 i2c_slave_event(priv->slave, I2C_SLAVE_READ_REQUESTED, &value); rcar_i2c_slave_irq()
389 i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_REQUESTED, &value); rcar_i2c_slave_irq()
399 i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value); rcar_i2c_slave_irq()
409 ret = i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_RECEIVED, &value); rcar_i2c_slave_irq()
417 i2c_slave_event(priv->slave, I2C_SLAVE_READ_PROCESSED, &value); rcar_i2c_slave_irq()
567 static int rcar_reg_slave(struct i2c_client *slave) rcar_reg_slave() argument
569 struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter); rcar_reg_slave()
571 if (priv->slave) rcar_reg_slave()
574 if (slave->flags & I2C_CLIENT_TEN) rcar_reg_slave()
579 priv->slave = slave; rcar_reg_slave()
580 rcar_i2c_write(priv, ICSAR, slave->addr); rcar_reg_slave()
588 static int rcar_unreg_slave(struct i2c_client *slave) rcar_unreg_slave() argument
590 struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter); rcar_unreg_slave()
592 WARN_ON(!priv->slave); rcar_unreg_slave()
597 priv->slave = NULL; rcar_unreg_slave()
H A Di2c-pxa.c19 * Dec 2004: Added support for PXA27x and slave device probing [Liam Girdwood]
20 * Feb 2005: Rework slave mode handling [RMK]
107 #define ICR_SSDIE (1 << 11) /* slave STOP detected int enable */
109 #define ICR_SADIE (1 << 13) /* slave address detected int enable */
119 #define ISR_SSD (1 << 4) /* slave stop detected */
124 #define ISR_SAD (1 << 9) /* slave address detected */
139 struct i2c_slave_client *slave; member in struct:pxa_i2c
291 dev_dbg(&i2c->adap.dev, "%s: called in slave mode\n", __func__); i2c_pxa_abort()
470 dev_info(&i2c->adap.dev, "Enabling slave mode\n"); i2c_pxa_reset()
494 if (i2c->slave != NULL) i2c_pxa_slave_txempty()
495 ret = i2c->slave->read(i2c->slave->data); i2c_pxa_slave_txempty()
506 if (i2c->slave != NULL) i2c_pxa_slave_rxfull()
507 i2c->slave->write(i2c->slave->data, byte); i2c_pxa_slave_rxfull()
517 dev_dbg(&i2c->adap.dev, "SAD, mode is slave-%cx\n", i2c_pxa_slave_start()
520 if (i2c->slave != NULL) i2c_pxa_slave_start()
521 i2c->slave->event(i2c->slave->data, i2c_pxa_slave_start()
525 * slave could interrupt in the middle of us generating a i2c_pxa_slave_start()
554 if (i2c->slave != NULL) i2c_pxa_slave_stop()
555 i2c->slave->event(i2c->slave->data, I2C_SLAVE_EVENT_STOP); i2c_pxa_slave_stop()
562 * kick it off now that the slave has completed. i2c_pxa_slave_stop()
588 * slave could interrupt in the middle of us generating a i2c_pxa_slave_start()
638 * Step 1: target slave address into IDBR i2c_pxa_start_message()
1214 i2c->slave = plat->slave; i2c_pxa_probe()
1258 printk(KERN_INFO "I2C: %s: PXA I2C adapter, slave address %d\n", i2c_pxa_probe()
H A Di2c-iop3xx.h34 * IOP3XX_ICR_GCD: 1 disables response as slave. "This bit must be set
65 #define IOP3XX_ISR_RXREAD 0x0001 /* 1=READ 0=WRITE (R/W bit of slave addr */
79 #define MYSAR 0 /* default slave address */
H A Di2c-sh7760.c25 #define I2CSCR 0x0 /* slave ctrl */
27 #define I2CSSR 0x8 /* slave status */
29 #define I2CSIER 0x10 /* slave irq enable */
32 #define I2CSAR 0x1c /* slave address */
58 #define MSR_MAT 0x01 /* slave addr xfer done */
157 /* i2c slave addr was sent; set to "normal" operation */ sh7760_i2c_irq()
246 /* set the slave addr reg; otherwise rcv wont work! */ sh7760_i2c_mrecv()
272 /* set the slave addr reg; otherwise xmit wont work! */ sh7760_i2c_msend()
365 /* reset slave module registers too: master mode enables slave sh7760_i2c_master_xfer()
H A Di2c-pnx.c76 #define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */
77 #define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */
122 * @slave_addr: slave address
133 /* Check for 7 bit slave addresses only */ i2c_pnx_start()
136 "%s: Invalid slave address %x. Only 7-bit addresses are supported\n", i2c_pnx_start()
168 /* Write the slave address, START bit and R/W bit */ i2c_pnx_start()
207 * i2c_pnx_master_xmit - transmit data to slave
210 * Sends one byte of data to the slave
277 * i2c_pnx_master_rcv - receive data from slave
280 * Reads one byte data from the slave
543 /* Put start-code and slave-address on the bus. */ i2c_pnx_xfer()
/linux-4.1.27/sound/firewire/dice/
H A Ddice-stream.c191 struct amdtp_stream *master, *slave; snd_dice_stream_start_duplex() local
204 slave = &dice->rx_stream; snd_dice_stream_start_duplex()
207 slave = &dice->tx_stream; snd_dice_stream_start_duplex()
211 if (amdtp_streaming_error(master) || amdtp_streaming_error(slave)) snd_dice_stream_start_duplex()
227 stop_stream(dice, slave); snd_dice_stream_start_duplex()
230 amdtp_stream_set_sync(sync_mode, master, slave); snd_dice_stream_start_duplex()
246 err = start_stream(dice, slave, rate); snd_dice_stream_start_duplex()
249 "fail to start AMDTP slave stream\n"); snd_dice_stream_start_duplex()
258 stop_stream(dice, slave); snd_dice_stream_start_duplex()
264 !amdtp_stream_wait_callback(slave, CALLBACK_TIMEOUT)) { snd_dice_stream_start_duplex()
267 stop_stream(dice, slave); snd_dice_stream_start_duplex()
/linux-4.1.27/net/ax25/
H A Dax25_ds_subr.c153 * mode. We thus flag the 'real' slave connections with
154 * ax25->dama_slave=1 and look on every disconnect if still slave
178 if (ax25_dev->dama.slave == 0) ax25_dev_dama_on()
181 ax25_dev->dama.slave = 1; ax25_dev_dama_on()
190 if (ax25_dev->dama.slave && !ax25_check_dama_slave(ax25_dev)) { ax25_dev_dama_off()
192 ax25_dev->dama.slave = 0; ax25_dev_dama_off()
H A Dax25_timer.c139 if (ax25->ax25_dev->dama.slave) ax25_heartbeat_expiry()
160 if (!ax25->ax25_dev->dama.slave) ax25_t1timer_expiry()
179 if (!ax25->ax25_dev->dama.slave) ax25_t2timer_expiry()
198 if (ax25->ax25_dev->dama.slave) ax25_t3timer_expiry()
219 if (ax25->ax25_dev->dama.slave) ax25_idletimer_expiry()
H A Dax25_ds_timer.c35 * Add DAMA slave timeout timer to timer list.
66 * Silently discard all (slave) connections in case our master forgot us...
74 if (ax25_dev == NULL || !ax25_dev->dama.slave) ax25_ds_timeout()
/linux-4.1.27/include/linux/usb/
H A Dch9.h10 * - the Linux "gadget" slave/device/peripheral side driver API.
13 * act either as a USB master/host or as a USB slave/device. That means
14 * the master and slave side APIs benefit from working well together.
/linux-4.1.27/drivers/media/pci/cx23885/
H A Dcx23885-f300.c105 f300_send_byte(dev, 0xe0);/* the slave address is 0xe0, write */ f300_xfer()
125 printk(KERN_ERR "%s: timeout, the slave no response\n", f300_xfer()
127 ret = 1; /* timeout, the slave no response */ f300_xfer()
128 } else { /* the slave not busy, prepare for getting data */ f300_xfer()
/linux-4.1.27/drivers/media/tuners/
H A Dtda18271.h72 /* slave tuner output & loop thru & xtal oscillator always on */
75 /* slave tuner output loop thru off */
93 /* master / slave tuner: master uses main pll, slave uses cal pll */
/linux-4.1.27/arch/arm/mach-shmobile/
H A Dr8a7779.h6 /* HPB-DMA slave IDs */
H A Dsh73a0.h4 /* DMA slave IDs */
H A Dr8a7740.h25 /* DMA slave IDs */
H A Dr8a7778.h20 /* HPB-DMA slave IDs */
/linux-4.1.27/net/hsr/
H A Dhsr_device.h19 int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
H A Dhsr_device.c189 netdev_warn(dev, "No slave devices configured\n");
430 int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2], hsr_dev_finalize() argument
442 ether_addr_copy(hsr_dev->dev_addr, slave[0]->dev_addr); hsr_dev_finalize()
446 slave[1]->dev_addr); hsr_dev_finalize()
486 res = hsr_add_port(hsr, slave[0], HSR_PT_SLAVE_A); hsr_dev_finalize()
489 res = hsr_add_port(hsr, slave[1], HSR_PT_SLAVE_B); hsr_dev_finalize()
/linux-4.1.27/drivers/media/pci/zoran/
H A Dvideocodec.h44 The slave has just to setup the videocodec structure and use two functions:
53 The slave is called during attach/detach via functions setup previously
55 and the slave can access any io registers of the master device (in the case
56 the slave is bound to it). Otherwise it doesn't need this functions and
63 to be set up for the master and the slave.
66 The master should have "knowledge" of the slave and vice versa. So the data
67 structures sent to/from slave via set_data/get_data set_image/get_image are
82 readreg -> ref. to read-fn from register (setup by master, used by slave)
83 writereg -> ref. to write-fn to register (setup by master, used by slave)
86 ==== slave functionality setup ====
87 slave_data -> data ref. for the slave (e.g. the zr36050,60)
263 /* -- filled in by slave device during register -- */
273 /* -- these are filled in by the slave device during register -- */
275 void *data; /* private slave data */
339 /* function prototypes of the master/slave interface */
/linux-4.1.27/arch/mips/boot/dts/include/dt-bindings/clock/
H A Dbcm21664.h27 #define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu"
51 /* slave CCU clock ids */
H A Dbcm281xx.h33 #define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu"
63 /* slave CCU clock ids */
/linux-4.1.27/arch/powerpc/boot/dts/include/dt-bindings/clock/
H A Dbcm21664.h27 #define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu"
51 /* slave CCU clock ids */
H A Dbcm281xx.h33 #define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu"
63 /* slave CCU clock ids */
/linux-4.1.27/arch/arm64/boot/dts/include/dt-bindings/clock/
H A Dbcm21664.h27 #define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu"
51 /* slave CCU clock ids */
H A Dbcm281xx.h33 #define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu"
63 /* slave CCU clock ids */
/linux-4.1.27/arch/metag/boot/dts/include/dt-bindings/clock/
H A Dbcm21664.h27 #define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu"
51 /* slave CCU clock ids */
H A Dbcm281xx.h33 #define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu"
63 /* slave CCU clock ids */
/linux-4.1.27/arch/arm/boot/dts/include/dt-bindings/clock/
H A Dbcm21664.h27 #define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu"
51 /* slave CCU clock ids */
H A Dbcm281xx.h33 #define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu"
63 /* slave CCU clock ids */
/linux-4.1.27/net/batman-adv/
H A Dhard-interface.h31 * enum batadv_hard_if_cleanup - Cleanup modi for soft_iface after slave removal
33 * @BATADV_IF_CLEANUP_AUTO: Delete soft-interface after last slave was removed
/linux-4.1.27/include/dt-bindings/clock/
H A Dbcm21664.h27 #define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu"
51 /* slave CCU clock ids */
H A Dbcm281xx.h33 #define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu"
63 /* slave CCU clock ids */
/linux-4.1.27/drivers/mfd/
H A Dpalmas.c432 int ret, slave; palmas_power_off() local
437 slave = PALMAS_BASE_TO_SLAVE(PALMAS_PMU_CONTROL_BASE); palmas_power_off()
441 palmas_dev->regmap[slave], palmas_power_off()
500 int slave; palmas_i2c_probe() local
578 slave = PALMAS_BASE_TO_SLAVE(PALMAS_INTERRUPT_BASE); palmas_i2c_probe()
582 regmap_write(palmas->regmap[slave], addr, reg); palmas_i2c_probe()
584 ret = regmap_add_irq_chip(palmas->regmap[slave], palmas->irq, palmas_i2c_probe()
591 slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE); palmas_i2c_probe()
597 ret = regmap_write(palmas->regmap[slave], addr, reg); palmas_i2c_probe()
601 ret = regmap_read(palmas->regmap[slave], addr, &reg); palmas_i2c_probe()
632 ret = regmap_write(palmas->regmap[slave], addr, reg); palmas_i2c_probe()
636 ret = regmap_read(palmas->regmap[slave], addr, &reg); palmas_i2c_probe()
656 slave = PALMAS_BASE_TO_SLAVE(PALMAS_PMU_CONTROL_BASE); palmas_i2c_probe()
659 ret = regmap_write(palmas->regmap[slave], addr, reg); palmas_i2c_probe()
/linux-4.1.27/sound/firewire/bebob/
H A Dbebob_stream.c496 struct amdtp_stream *master, *slave; snd_bebob_stream_start_duplex() local
531 slave = &bebob->rx_stream; snd_bebob_stream_start_duplex()
535 slave = &bebob->tx_stream; snd_bebob_stream_start_duplex()
555 if (amdtp_streaming_error(slave)) snd_bebob_stream_start_duplex()
556 amdtp_stream_stop(slave); snd_bebob_stream_start_duplex()
558 !amdtp_stream_running(master) && !amdtp_stream_running(slave)) snd_bebob_stream_start_duplex()
572 amdtp_stream_stop(slave); snd_bebob_stream_start_duplex()
578 amdtp_stream_set_sync(sync_mode, master, slave); snd_bebob_stream_start_duplex()
636 /* start slave if needed */ snd_bebob_stream_start_duplex()
637 if (atomic_read(slave_substreams) > 0 && !amdtp_stream_running(slave)) { snd_bebob_stream_start_duplex()
638 err = start_stream(bebob, slave, rate); snd_bebob_stream_start_duplex()
641 "fail to run AMDTP slave stream:%d\n", err); snd_bebob_stream_start_duplex()
648 if (!amdtp_stream_wait_callback(slave, CALLBACK_TIMEOUT)) { snd_bebob_stream_start_duplex()
649 amdtp_stream_stop(slave); snd_bebob_stream_start_duplex()
662 struct amdtp_stream *master, *slave; snd_bebob_stream_stop_duplex() local
666 slave = &bebob->tx_stream; snd_bebob_stream_stop_duplex()
671 slave = &bebob->rx_stream; snd_bebob_stream_stop_duplex()
680 amdtp_stream_pcm_abort(slave); snd_bebob_stream_stop_duplex()
681 amdtp_stream_stop(slave); snd_bebob_stream_stop_duplex()
/linux-4.1.27/include/linux/amba/
H A Dpl022.h201 * slave is sampled directly
202 * @SSP_FEEDBACK_CLK_DELAY_1T: the incoming slave data is sampled with
237 * each slave has a chipselect signal, but it's common that not
238 * every chipselect is connected to a slave.
263 * slave devices, copied to spi_device.controller_data.
266 * @hierarchy: sets whether interface is master or slave
267 * @slave_tx_disable: SSPTXD is disconnected (in slave mode only)
/linux-4.1.27/drivers/gpu/drm/tegra/
H A Ddsi.c83 struct tegra_dsi *slave; member in struct:tegra_dsi
393 if (dsi->slave) tegra_dsi_set_phy_timing()
394 tegra_dsi_set_phy_timing(dsi->slave, period, timing); tegra_dsi_set_phy_timing()
471 if (dsi->slave) tegra_dsi_enable()
472 tegra_dsi_enable(dsi->slave); tegra_dsi_enable()
480 if (dsi->slave) tegra_dsi_get_lanes()
481 return dsi->lanes + dsi->slave->lanes; tegra_dsi_get_lanes()
573 if (dsi->master || dsi->slave) { tegra_dsi_configure()
593 if (dsi->master || dsi->slave) { tegra_dsi_configure()
614 if (dsi->slave) { tegra_dsi_configure()
615 tegra_dsi_configure(dsi->slave, pipe, mode); tegra_dsi_configure()
622 tegra_dsi_ganged_enable(dsi->slave, mode->hdisplay / 2, tegra_dsi_configure()
652 if (dsi->slave) tegra_dsi_video_disable()
653 tegra_dsi_video_disable(dsi->slave); tegra_dsi_video_disable()
682 if (dsi->slave) tegra_dsi_set_timeout()
683 tegra_dsi_set_timeout(dsi->slave, bclk, vrefresh); tegra_dsi_set_timeout()
690 if (dsi->slave) { tegra_dsi_disable()
691 tegra_dsi_ganged_disable(dsi->slave); tegra_dsi_disable()
699 if (dsi->slave) tegra_dsi_disable()
700 tegra_dsi_disable(dsi->slave); tegra_dsi_disable()
725 if (dsi->slave) tegra_dsi_soft_reset()
726 tegra_dsi_soft_reset(dsi->slave); tegra_dsi_soft_reset()
1364 parent = clk_get_parent(dsi->slave->clk); tegra_dsi_ganged_setup()
1384 if (dsi->slave) { tegra_dsi_host_attach()
1445 dsi->slave = platform_get_drvdata(gangster); tegra_dsi_ganged_probe()
1448 if (!dsi->slave) tegra_dsi_ganged_probe()
1451 dsi->slave->master = dsi; tegra_dsi_ganged_probe()
/linux-4.1.27/fs/
H A Dmount.h52 struct list_head mnt_slave_list;/* list of slave mounts */
53 struct list_head mnt_slave; /* slave list entry */
54 struct mount *mnt_master; /* slave is on master->mnt_slave_list */
H A Dpnode.c74 * slave 'mnt' to a peer mount that has the do_make_slave()
76 * slave it to anything that is available. do_make_slave()
141 * Note that peer groups form contiguous segments of slave lists.
268 * all the peer and slave mounts of 'dest_mnt'.
304 /* all slave groups */ propagate_mnt()
307 /* everything in that slave group */ propagate_mnt()
/linux-4.1.27/drivers/staging/vme/devices/
H A Dvme_user.c57 * 4 = /dev/bus/vme/s0 First slave image
58 * 5 = /dev/bus/vme/s1 Second slave image
59 * 6 = /dev/bus/vme/s2 Third slave image
60 * 7 = /dev/bus/vme/s3 Fourth slave image
68 * even support the tsi148 chipset (which has 8 master and 8 slave windows).
77 * The vmelinux.org driver never supported slave images, the devices reserved
90 #define PCI_BUF_SIZE 0x20000 /* Size of one slave image buffer */
458 struct vme_slave slave; vme_user_ioctl() local
532 memset(&slave, 0, sizeof(struct vme_slave)); vme_user_ioctl()
538 &slave.enable, &slave.vme_addr, vme_user_ioctl()
539 &slave.size, &pci_addr, &slave.aspace, vme_user_ioctl()
540 &slave.cycle); vme_user_ioctl()
542 copied = copy_to_user(argp, &slave, vme_user_ioctl()
553 copied = copy_from_user(&slave, argp, sizeof(slave)); vme_user_ioctl()
563 slave.enable, slave.vme_addr, slave.size, vme_user_ioctl()
564 image[minor].pci_buf, slave.aspace, vme_user_ioctl()
565 slave.cycle); vme_user_ioctl()
792 /* Request slave resources and allocate buffers (128kB wide) */ vme_user_probe()
795 /* For ca91cx42 bridge there are only two slave windows vme_user_probe()
803 "Unable to allocate slave resource\n"); vme_user_probe()
899 * Ensure counter set correcty to unalloc all slave windows and buffers vme_user_probe()
/linux-4.1.27/drivers/gpu/drm/
H A Ddrm_encoder_slave.c32 * drm_i2c_encoder_init - Initialize an I2C slave encoder
44 * the hooks provided by the slave driver.
47 * slave config.
107 * This should be called from the @destroy method of an I2C slave
/linux-4.1.27/arch/mips/include/asm/mach-loongson/
H A Dkernel-entry-init.h34 * Do SMP slave processor setup.
/linux-4.1.27/arch/mips/include/asm/mach-paravirt/
H A Dkernel-entry-init.h24 * Do SMP slave processor setup necessary before we can safely execute
/linux-4.1.27/drivers/gpu/drm/tilcdc/
H A Dtilcdc_slave.h21 /* sub-module for i2c slave encoder output */
H A Dtilcdc_slave.c83 * edges and add HSKEW offset to let the slave encoder fix it up. slave_encoder_fixup()
362 tilcdc_module_init(mod, "slave", &slave_module_ops); slave_probe()
389 { .compatible = "ti,tilcdc,slave", },
398 .name = "slave",
/linux-4.1.27/include/uapi/linux/
H A Dif_bonding.h15 * - Added support for getting slave's speed and duplex via ethtool.
21 * each slave.
74 /* each slave's link has 4 states */
80 /* each slave has several states */
H A Di2c-dev.h42 #define I2C_SLAVE 0x0703 /* Use this slave address */
43 #define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it
H A Di2c.h41 * I2C slave address. For read transactions where I2C_M_RECV_LEN
44 * slave (plus, if used, the SMBus PEC); and this value will be
55 * START. That is followed by the slave address, and a bit encoding read
69 __u16 addr; /* slave address */
72 #define I2C_M_RD 0x0001 /* read data, from slave to master */
H A Disdn.h111 char slave[10]; /* Name of Slave for Bundling */ member in struct:__anon13373
121 int slavedelay; /* Delay until slave starts up */
130 int triggercps; /* BogoCPS needed for triggering slave */
/linux-4.1.27/arch/mips/include/asm/txx9/
H A Ddmac.h35 * struct txx9dmac_slave - Controller-specific information about a slave
/linux-4.1.27/arch/parisc/include/asm/
H A Dsmp.h8 ** slave CPUs still in "Icache loop".
/linux-4.1.27/arch/arm/mach-pxa/include/mach/
H A Dpxa27x.h12 #define ARB_DMA_SLV_PARK (1<<31) /* Be parked with DMA slave when idle */
/linux-4.1.27/arch/arm/mach-davinci/
H A Dpm_domain.c56 .con_ids = { "fck", "master", "slave", NULL },
/linux-4.1.27/arch/arm/mach-mmp/include/mach/
H A Daddr-map.h17 * slave port to AHB/APB bridge, due to its close relationship to those
/linux-4.1.27/sound/soc/spear/
H A Dspear_pcm.c42 bool (*filter)(struct dma_chan *chan, void *slave)) devm_spear_pcm_platform_register()
40 devm_spear_pcm_platform_register(struct device *dev, struct snd_dmaengine_pcm_config *config, bool (*filter)(struct dma_chan *chan, void *slave)) devm_spear_pcm_platform_register() argument
H A Dspear_pcm.h22 bool (*filter)(struct dma_chan *chan, void *slave));
/linux-4.1.27/drivers/staging/sm750fb/
H A Dddk750_swi2c.h37 * This function reads the slave device's register
53 * This function writes a value to the slave device's register
H A Dddk750_hwi2c.c82 * This function writes data to the i2c slave device registers.
147 * This function reads data from the slave device and stores them
154 * from the slave device. It has to be the same size as the
158 * Total number of actual bytes read from the slave device
214 * This function reads the slave device's register
242 * This function writes a value to the slave device's register
H A Dddk750_swi2c.c221 * This function sends the start command to the slave device
232 * This function sends the stop command to the slave device
243 * This function writes one byte to the slave device
246 * data - Data to be write to the slave device
311 * This function reads one byte from the slave device
315 * message to the slave device or not
447 * This function reads the slave device's register
485 * This function writes a value to the slave device's register
/linux-4.1.27/drivers/gpu/drm/nouveau/
H A Dnouveau_encoder.h71 struct drm_encoder_slave *slave = to_encoder_slave(enc); nouveau_encoder() local
73 return container_of(slave, struct nouveau_encoder, base); nouveau_encoder()
/linux-4.1.27/drivers/w1/slaves/
H A Dw1_bq27000.c113 MODULE_PARM_DESC(F_ID, "1-wire slave FID for BQ device");
117 MODULE_DESCRIPTION("HDQ/1-wire slave driver bq27000 battery monitor chip");
/linux-4.1.27/include/linux/spi/
H A Dspi_gpio.h20 * // this slave uses GPIO 42 for its chipselect
61 * drivers expect to see all-ones data as the no slave "response".)
H A Dpxa2xx_spi.h39 /* spi_board_info.controller_data for SPI slave devices,
/linux-4.1.27/arch/s390/include/asm/
H A Dccwgroup.h10 * @count: number of attached slave devices
12 * @cdev: variable number of slave devices, allocated as needed
/linux-4.1.27/arch/arm/mach-spear/
H A Dspear3xx.c35 * two type of chipselects on which slave devices can work. One is chip
40 * slave on each master requires a separate gpio pin.
/linux-4.1.27/drivers/dma/sh/
H A Dshdma-base.c43 * For slave DMA we assume, that there is a finite number of DMA slaves in the
44 * system, and that each such slave can only use a finite number of channels.
45 * We use slave channel IDs to make sure, that no such slave channel ID is
212 struct shdma_slave *slave = chan->private; shdma_alloc_chan_resources() local
219 if (slave) { shdma_alloc_chan_resources()
221 schan->real_slave_id = slave->slave_id; shdma_alloc_chan_resources()
251 if (slave) shdma_alloc_chan_resources()
253 clear_bit(slave->slave_id, shdma_slave_used); shdma_alloc_chan_resources()
261 * You always have to pass a valid slave id as the argument, old drivers that
264 * parameter. If this filter is used, the slave driver, after calling
274 * In that case the MID-RID value is used for slave channel filtering and is
294 * set_slave function from the slave ID that is passed in shdma_chan_filter()
295 * from xlate. For the non-DT case, the slave ID is shdma_chan_filter()
308 /* No slave requested - arbitrary channel */ shdma_chan_filter()
309 dev_warn(sdev->dma_dev.dev, "invalid slave ID passed to dma_request_slave\n"); shdma_chan_filter()
499 * @direction: needed for slave DMA to decide which address to keep constant,
556 * Common routine for public (MEMCPY) and slave DMA. The MEMCPY case is also
558 * list manipulation. For slave DMA direction carries the usual meaning, and,
559 * logically, the SG list is RAM and the addr variable contains slave address,
679 /* Someone calling slave DMA on a generic channel? */ shdma_prep_slave_sg()
720 /* Someone calling slave DMA on a generic channel? */ shdma_prep_dma_cyclic()
786 * So far only .slave_id is used, but the slave drivers are shdma_config()
H A Dshdma-of.c33 /* Only slave DMA channels can be allocated via DT */ shdma_of_xlate()
H A Dshdma-r8a73a4.c64 .slave = dma_slaves,
/linux-4.1.27/include/linux/mlx4/
H A Ddevice.h987 static inline int mlx4_is_guest_proxy(struct mlx4_dev *dev, int slave, u32 qpn) mlx4_is_guest_proxy() argument
989 int guest_proxy_base = dev->phys_caps.base_proxy_sqpn + slave * 8; mlx4_is_guest_proxy()
1364 void mlx4_sync_pkey_table(struct mlx4_dev *dev, int slave, int port,
1369 int mlx4_is_slave_active(struct mlx4_dev *dev, int slave);
1370 int mlx4_gen_pkey_eqe(struct mlx4_dev *dev, int slave, u8 port);
1371 int mlx4_gen_guid_change_eqe(struct mlx4_dev *dev, int slave, u8 port);
1373 int mlx4_gen_port_state_change_eqe(struct mlx4_dev *dev, int slave, u8 port, u8 port_subtype_change);
1374 enum slave_port_state mlx4_get_slave_port_state(struct mlx4_dev *dev, int slave, u8 port);
1375 int set_and_calc_slave_port_state(struct mlx4_dev *dev, int slave, u8 port, int event, enum slave_port_gen_event *gen_event);
1377 void mlx4_put_slave_node_guid(struct mlx4_dev *dev, int slave, __be64 guid);
1378 __be64 mlx4_get_slave_node_guid(struct mlx4_dev *dev, int slave);
1393 /* Returns a bitmap of the physical ports which are assigned to slave */
1394 struct mlx4_active_ports mlx4_get_active_ports(struct mlx4_dev *dev, int slave);
1396 /* Returns the physical port that represents the virtual port of the slave, */
1397 /* or a value < 0 in case of an error. If a slave has 2 ports, the identity */
1399 int mlx4_slave_convert_port(struct mlx4_dev *dev, int slave, int port);
1414 /* Returns the slave's virtual port that represents the physical port. */
1415 int mlx4_phys_to_slave_port(struct mlx4_dev *dev, int slave, int port);
1417 int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port);
1422 int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port);
1423 int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port);
1424 int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port,
/linux-4.1.27/arch/cris/arch-v32/drivers/
H A Di2c.c405 * send slave address i2c_write()
464 * send slave address i2c_read()
519 * send slave address i2c_writereg()
583 * send slave address i2c_readreg()
607 * send slave address i2c_readreg()
661 /* write to an i2c slave */ i2c_ioctl()
677 /* read from an i2c slave */ i2c_ioctl()
/linux-4.1.27/arch/mips/kernel/
H A Di8259.c174 outb(0x60+(irq&7), PIC_SLAVE_CMD);/* 'Specific EOI' to slave */ mask_and_ack_8259A()
262 outb_p(1U << PIC_CASCADE_IR, PIC_MASTER_IMR); /* 8259A-1 (the master) has a slave on IR2 */ init_8259A()
270 outb_p(PIC_CASCADE_IR, PIC_SLAVE_IMR); /* 8259A-2 is a slave on master's IR2 */ init_8259A()
271 outb_p(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR); /* (slave's support for AEOI in flat mode is to be investigated) */ init_8259A()
284 outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ init_8259A()
/linux-4.1.27/sound/firewire/
H A Damdtp.h264 struct amdtp_stream *slave) amdtp_stream_set_sync()
268 slave->flags |= CIP_SYNC_TO_DEVICE; amdtp_stream_set_sync()
269 master->sync_slave = slave; amdtp_stream_set_sync()
272 slave->flags &= ~CIP_SYNC_TO_DEVICE; amdtp_stream_set_sync()
276 slave->sync_slave = NULL; amdtp_stream_set_sync()
262 amdtp_stream_set_sync(enum cip_flags sync_mode, struct amdtp_stream *master, struct amdtp_stream *slave) amdtp_stream_set_sync() argument
/linux-4.1.27/arch/cris/include/arch-v32/arch/hwregs/
H A Dmarb_bp_defs.h116 unsigned int slave : 1; member in struct:__anon810
163 unsigned int slave : 1; member in struct:__anon813
183 unsigned int slave : 1; member in struct:__anon814
H A Dmarb_defs.h171 unsigned int slave : 1; member in struct:__anon823
192 unsigned int slave : 1; member in struct:__anon824
212 unsigned int slave : 1; member in struct:__anon825
386 unsigned int slave : 1; member in struct:__anon829
433 unsigned int slave : 1; member in struct:__anon832
453 unsigned int slave : 1; member in struct:__anon833
/linux-4.1.27/arch/cris/include/arch-v32/mach-fs/mach/hwregs/
H A Dmarb_bp_defs.h116 unsigned int slave : 1; member in struct:__anon1316
163 unsigned int slave : 1; member in struct:__anon1319
183 unsigned int slave : 1; member in struct:__anon1320
H A Dmarb_defs.h171 unsigned int slave : 1; member in struct:__anon1329
192 unsigned int slave : 1; member in struct:__anon1330
212 unsigned int slave : 1; member in struct:__anon1331
386 unsigned int slave : 1; member in struct:__anon1335
433 unsigned int slave : 1; member in struct:__anon1338
453 unsigned int slave : 1; member in struct:__anon1339
/linux-4.1.27/drivers/staging/lustre/lustre/include/
H A Dlustre_quota.h90 /* Handle dqacq/dqrel request from slave. */
126 /* The quota slave feature is implemented under the form of a library.
136 * - qsd_prepare(): This sets up on-disk objects associated with the quota slave
149 * qsd_init(). This releases all quota slave objects and frees the
206 /* quota slave entry structure associated with this ID */
237 * on slave */
/linux-4.1.27/arch/x86/kernel/
H A Di8259.c177 /* 'Specific EOI' to slave */ mask_and_ack_8259A()
293 outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ unmask_8259A()
335 /* 8259A-1 (the master) has a slave on IR2 */ init_8259A()
347 /* 8259A-2 is a slave on master's IR2 */ init_8259A()
349 /* (slave's support for AEOI in flat mode is to be investigated) */ init_8259A()
364 outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ init_8259A()
/linux-4.1.27/drivers/bus/
H A Domap_l3_noc.c34 * @err_src: error source index of the slave (target)
37 * 3) Parse in the slave information
163 * 2) Identify the slave where the error information is logged
164 * ... handle the slave event..
165 * 7) if the slave is unknown, mask out the slave.
/linux-4.1.27/sound/soc/fsl/
H A Dmpc8610_hpcd.c120 * a slave or master. mpc8610_hpcd_startup()
247 if (strcasecmp(sprop, "i2s-slave") == 0) { mpc8610_hpcd_probe()
253 /* In i2s-slave mode, the codec has its own clock source, so we mpc8610_hpcd_probe()
270 } else if (strcasecmp(sprop, "lj-slave") == 0) { mpc8610_hpcd_probe()
280 } else if (strcasecmp(sprop, "rj-slave") == 0) { mpc8610_hpcd_probe()
290 } else if (strcasecmp(sprop, "ac97-slave") == 0) { mpc8610_hpcd_probe()
/linux-4.1.27/drivers/staging/comedi/drivers/
H A Dplx9052.h67 #define PLX9052_CNTRL_RETRY_CLKS(x) (((x) & 0xf) << 19) /* slave retry clks */
68 #define PLX9052_CNTRL_LOCK_ENAB (1 << 23) /* slave LOCK# enable */
/linux-4.1.27/include/media/
H A Dv4l2-mediabus.h18 * Can the client run in master or in slave mode. By "Master mode" an operation
21 * providing these signals to the slave.
H A Dsi4713.h18 /* The SI4713 I2C sensor chip has a fixed slave address of 0xc6 or 0x22. */
/linux-4.1.27/sound/soc/tegra/
H A Dtegra20_das.h99 * one the slave. Each DAC allows selection of a specific DAP for input, to
118 * master: Is this DAP the master (1) or slave (0)
/linux-4.1.27/drivers/parport/
H A Dshare.c377 struct parport *slave = port->slaves[i-1]; parport_announce_port() local
378 if (slave) parport_announce_port()
379 list_add_tail(&slave->list, &portlist); parport_announce_port()
386 struct parport *slave = port->slaves[i-1]; parport_announce_port() local
387 if (slave) parport_announce_port()
388 attach_driver_chain(slave); parport_announce_port()
425 struct parport *slave = port->slaves[i-1]; parport_remove_port() local
426 if (!slave) parport_remove_port()
428 detach_driver_chain(slave); parport_remove_port()
429 parport_daisy_fini(slave); parport_remove_port()
437 struct parport *slave = port->slaves[i-1]; parport_remove_port() local
438 if (slave) parport_remove_port()
439 list_del_init(&slave->list); parport_remove_port()
448 struct parport *slave = port->slaves[i-1]; parport_remove_port() local
449 if (slave) parport_remove_port()
450 parport_put_port(slave); parport_remove_port()
/linux-4.1.27/drivers/gpu/drm/atmel-hlcdc/
H A Datmel_hlcdc_output.c42 * This structure stores RGB slave device information.
72 * This structure is specialization of the slave device structure to
75 * @base: base slave device fields
76 * @panel: drm panel attached to this slave device
/linux-4.1.27/drivers/input/misc/
H A Dapanel.c292 unsigned char method, slave, chip; apanel_init() local
296 slave = readb(p + 3) >> 1; apanel_init()
298 if (slave != i2c_addr) { apanel_init()
299 pr_notice(APANEL ": only one SMBus slave " apanel_init()
/linux-4.1.27/arch/powerpc/sysdev/
H A Di8259.c152 .name = "8259 (slave)",
239 outb(0x04, 0x21); /* edge tiggered, Cascade (slave) on IRQ2 */ i8259_init()
242 /* init slave interrupt controller */ i8259_init()
245 outb(0x02, 0xA1); /* edge triggered, Cascade (slave) on IRQ2 */ i8259_init()
/linux-4.1.27/arch/sh/drivers/pci/
H A Dfixups-landisk.c46 bcr1 |= 0x40080000; /* Enable Bit 19 BREQEN, set PCIC to slave */ pci_fixup_pcic()
H A Dfixups-rts7751r2d.c47 bcr1 |= 0x40080000; /* Enable Bit 19 BREQEN, set PCIC to slave */ pci_fixup_pcic()
/linux-4.1.27/arch/blackfin/include/asm/
H A Dbfin5xx_spi.h74 /* spi_board_info.controller_data for SPI slave devices,
/linux-4.1.27/arch/m68k/include/asm/
H A Dmvme147hw.h53 volatile u_char slave; member in struct:pcc_regs
/linux-4.1.27/net/dsa/
H A Ddsa_priv.h55 /* slave.c */

Completed in 6392 milliseconds

12345