Home
last modified time | relevance | path

Searched full:sw (Results 1 – 25 of 1255) sorted by relevance

12345678910>>...51

/linux/drivers/thunderbolt/
H A Deeprom.c18 static int tb_eeprom_ctl_write(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_write() argument
20 return tb_sw_write(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + ROUTER_CS_4, 1); in tb_eeprom_ctl_write()
26 static int tb_eeprom_ctl_read(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_read() argument
28 return tb_sw_read(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + ROUTER_CS_4, 1); in tb_eeprom_ctl_read()
42 static int tb_eeprom_active(struct tb_switch *sw, bool enable) in tb_eeprom_active() argument
45 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_active()
50 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
54 return tb_eeprom_ctl_write(sw, in tb_eeprom_active()
71 tb_eeprom_transfer(struct tb_switch * sw,struct tb_eeprom_ctl * ctl,enum tb_eeprom_transfer direction) tb_eeprom_transfer() argument
96 tb_eeprom_out(struct tb_switch * sw,u8 val) tb_eeprom_out() argument
116 tb_eeprom_in(struct tb_switch * sw,u8 * val) tb_eeprom_in() argument
137 tb_eeprom_get_drom_offset(struct tb_switch * sw,u16 * offset) tb_eeprom_get_drom_offset() argument
168 tb_eeprom_read_n(struct tb_switch * sw,u16 offset,u8 * val,size_t count) tb_eeprom_read_n() argument
304 tb_drom_read_uid_only(struct tb_switch * sw,u64 * uid) tb_drom_read_uid_only() argument
326 tb_drom_parse_entry_generic(struct tb_switch * sw,struct tb_drom_entry_header * header) tb_drom_parse_entry_generic() argument
362 tb_drom_parse_entry_port(struct tb_switch * sw,struct tb_drom_entry_header * header) tb_drom_parse_entry_port() argument
409 tb_drom_parse_entries(struct tb_switch * sw,size_t header_size) tb_drom_parse_entries() argument
440 tb_switch_drom_alloc(struct tb_switch * sw,size_t size) tb_switch_drom_alloc() argument
453 tb_switch_drom_free(struct tb_switch * sw) tb_switch_drom_free() argument
466 tb_drom_copy_efi(struct tb_switch * sw,u16 * size) tb_drom_copy_efi() argument
496 tb_drom_copy_nvm(struct tb_switch * sw,u16 * size) tb_drom_copy_nvm() argument
536 usb4_copy_drom(struct tb_switch * sw,u16 * size) usb4_copy_drom() argument
557 tb_drom_bit_bang(struct tb_switch * sw,u16 * size) tb_drom_bit_bang() argument
585 tb_drom_parse_v1(struct tb_switch * sw) tb_drom_parse_v1() argument
613 usb4_drom_parse(struct tb_switch * sw) usb4_drom_parse() argument
629 tb_drom_parse(struct tb_switch * sw,u16 size) tb_drom_parse() argument
667 tb_drom_host_read(struct tb_switch * sw) tb_drom_host_read() argument
688 tb_drom_device_read(struct tb_switch * sw) tb_drom_device_read() argument
716 tb_drom_read(struct tb_switch * sw) tb_drom_read() argument
[all...]
H A Dtmu.c58 static bool tb_switch_tmu_enhanced_is_supported(const struct tb_switch *sw) in tb_switch_tmu_enhanced_is_supported() argument
60 return usb4_switch_version(sw) > 1; in tb_switch_tmu_enhanced_is_supported()
63 static int tb_switch_set_tmu_mode_params(struct tb_switch *sw, in tb_switch_set_tmu_mode_params() argument
72 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
73 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_set_tmu_mode_params()
80 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
81 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_set_tmu_mode_params()
85 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
86 sw->tmu.cap + TMU_RTR_CS_15, 1); in tb_switch_set_tmu_mode_params()
99 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
[all …]
H A Dlc.c15 * @sw: Switch whose UUID is read
20 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid) in tb_lc_read_uuid() argument
22 if (!sw->cap_lc) in tb_lc_read_uuid()
24 return tb_sw_read(sw, uuid, TB_CFG_SWITCH, sw->cap_lc + TB_LC_FUSE, 4); in tb_lc_read_uuid()
27 static int read_lc_desc(struct tb_switch *sw, u32 *desc) in read_lc_desc() argument
29 if (!sw->cap_lc) in read_lc_desc()
31 return tb_sw_read(sw, desc, TB_CFG_SWITCH, sw->cap_lc + TB_LC_DESC, 1); in read_lc_desc()
36 struct tb_switch *sw = port->sw; in find_port_lc_cap() local
40 ret = read_lc_desc(sw, &desc); in find_port_lc_cap()
49 return sw->cap_lc + start + phys * size; in find_port_lc_cap()
[all …]
H A Dtb.c111 static void tb_add_dp_resources(struct tb_switch *sw) in tb_add_dp_resources() argument
113 struct tb_cm *tcm = tb_priv(sw->tb); in tb_add_dp_resources()
116 tb_switch_for_each_port(sw, port) { in tb_add_dp_resources()
120 if (!tb_switch_query_dp_resource(sw, port)) in tb_add_dp_resources()
129 if (tb_route(sw)) in tb_add_dp_resources()
138 static void tb_remove_dp_resources(struct tb_switch *sw) in tb_remove_dp_resources() argument
140 struct tb_cm *tcm = tb_priv(sw->tb); in tb_remove_dp_resources()
144 tb_switch_for_each_port(sw, port) { in tb_remove_dp_resources()
146 tb_remove_dp_resources(port->remote->sw); in tb_remove_dp_resources()
150 if (port->sw in tb_remove_dp_resources()
184 tb_enable_clx(struct tb_switch * sw) tb_enable_clx() argument
235 tb_disable_clx(struct tb_switch * sw) tb_disable_clx() argument
256 struct tb_switch *sw; tb_increase_switch_tmu_accuracy() local
283 struct tb_switch *sw; tb_increase_tmu_accuracy() local
303 struct tb_switch *sw = tb_to_switch(dev); tb_switch_tmu_hifi_uni_required() local
319 tb_enable_tmu(struct tb_switch * sw) tb_enable_tmu() argument
376 tb_switch_discover_tunnels(struct tb_switch * sw,struct list_head * list,bool alloc_hopids) tb_switch_discover_tunnels() argument
433 struct tb_switch *sw = port->sw; tb_scan_xdomain() local
460 tb_find_unused_port(struct tb_switch * sw,enum tb_port_type type) tb_find_unused_port() argument
479 tb_find_usb3_down(struct tb_switch * sw,const struct tb_port * port) tb_find_usb3_down() argument
513 struct tb_switch *sw; tb_find_first_usb3_tunnel() local
905 tb_tunnel_usb3(struct tb * tb,struct tb_switch * sw) tb_tunnel_usb3() argument
997 tb_create_usb3_tunnels(struct tb_switch * sw) tb_create_usb3_tunnels() argument
1044 struct tb_switch *sw; tb_configure_asym() local
1151 struct tb_switch *sw; tb_configure_sym() local
1233 tb_configure_link(struct tb_port * down,struct tb_port * up,struct tb_switch * sw) tb_configure_link() argument
1273 tb_scan_switch(struct tb_switch * sw) tb_scan_switch() argument
1294 struct tb_switch *sw; tb_scan_port() local
1790 tb_free_unplugged_children(struct tb_switch * sw) tb_free_unplugged_children() argument
1814 tb_find_pcie_down(struct tb_switch * sw,const struct tb_port * port) tb_find_pcie_down() argument
2106 struct tb_switch *sw = port->sw; tb_enter_redrive() local
2131 struct tb_switch *sw = port->sw; tb_exit_redrive() local
2147 tb_switch_enter_redrive(struct tb_switch * sw) tb_switch_enter_redrive() argument
2159 tb_switch_exit_redrive(struct tb_switch * sw) tb_switch_exit_redrive() argument
2254 tb_disconnect_pci(struct tb * tb,struct tb_switch * sw) tb_disconnect_pci() argument
2275 tb_tunnel_pci(struct tb * tb,struct tb_switch * sw) tb_tunnel_pci() argument
2326 struct tb_switch *sw; tb_approve_xdomain_paths() local
2375 struct tb_switch *sw; __tb_disconnect_xdomain_paths() local
2426 struct tb_switch *sw; tb_handle_hotplug() local
2738 struct tb_switch *sw; tb_handle_dp_bandwidth_request() local
2968 struct tb_switch *sw = tb_to_switch(dev); tb_scan_finalize_switch() local
3081 tb_restore_children(struct tb_switch * sw) tb_restore_children() argument
3174 tb_free_unplugged_xdomains(struct tb_switch * sw) tb_free_unplugged_xdomains() argument
[all...]
H A Dicm.c422 struct icm_fr_pkg_get_topology_response *switches, *sw; in icm_fr_get_route() local
439 sw = &switches[0]; in icm_fr_get_route()
440 index = icm_fr_get_switch_index(sw->ports[link]); in icm_fr_get_route()
446 sw = &switches[index]; in icm_fr_get_route()
450 if (!(sw->first_data & ICM_SWITCH_USED)) { in icm_fr_get_route()
455 for (j = 0; j < ARRAY_SIZE(sw->ports); j++) { in icm_fr_get_route()
456 index = icm_fr_get_switch_index(sw->ports[j]); in icm_fr_get_route()
457 if (index > sw->switch_index) { in icm_fr_get_route()
458 sw = &switches[index]; in icm_fr_get_route()
464 *route = get_route(sw in icm_fr_get_route()
498 icm_fr_approve_switch(struct tb * tb,struct tb_switch * sw) icm_fr_approve_switch() argument
525 icm_fr_add_switch_key(struct tb * tb,struct tb_switch * sw) icm_fr_add_switch_key() argument
552 icm_fr_challenge_switch_key(struct tb * tb,struct tb_switch * sw,const u8 * challenge,u8 * response) icm_fr_challenge_switch_key() argument
638 struct tb_switch *sw; alloc_switch() local
656 add_switch(struct tb_switch * parent_sw,struct tb_switch * sw) add_switch() argument
672 update_switch(struct tb_switch * sw,u64 route,u8 connection_id,u8 connection_key,u8 link,u8 depth,bool boot) update_switch() argument
698 remove_switch(struct tb_switch * sw) remove_switch() argument
704 add_xdomain(struct tb_switch * sw,u64 route,const uuid_t * local_uuid,const uuid_t * remote_uuid,u8 link,u8 depth) add_xdomain() argument
737 struct tb_switch *sw; remove_xdomain() local
750 struct tb_switch *sw, *parent_sw; icm_fr_device_connected() local
897 struct tb_switch *sw; icm_fr_device_disconnected() local
932 struct tb_switch *sw; icm_fr_xdomain_connected() local
1066 icm_tr_approve_switch(struct tb * tb,struct tb_switch * sw) icm_tr_approve_switch() argument
1093 icm_tr_add_switch_key(struct tb * tb,struct tb_switch * sw) icm_tr_add_switch_key() argument
1121 icm_tr_challenge_switch_key(struct tb * tb,struct tb_switch * sw,const u8 * challenge,u8 * response) icm_tr_challenge_switch_key() argument
1236 struct tb_switch *sw, *parent_sw; __icm_tr_device_connected() local
1335 struct tb_switch *sw; icm_tr_device_disconnected() local
1361 struct tb_switch *sw; icm_tr_xdomain_connected() local
2042 icm_unplug_children(struct tb_switch * sw) icm_unplug_children() argument
2059 struct tb_switch *sw = tb_to_switch(dev); complete_rpm() local
2066 remove_unplugged_switch(struct tb_switch * sw) remove_unplugged_switch() argument
2087 icm_free_unplugged_children(struct tb_switch * sw) icm_free_unplugged_children() argument
2153 icm_runtime_suspend_switch(struct tb_switch * sw) icm_runtime_suspend_switch() argument
2160 icm_runtime_resume_switch(struct tb_switch * sw) icm_runtime_resume_switch() argument
2292 icm_usb4_switch_op(struct tb_switch * sw,u16 opcode,u32 * metadata,u8 * status,const void * tx_data,size_t tx_data_len,void * rx_data,size_t rx_data_len) icm_usb4_switch_op() argument
2354 icm_usb4_switch_nvm_authenticate_status(struct tb_switch * sw,u32 * status) icm_usb4_switch_nvm_authenticate_status() argument
[all...]
H A Dusb4.c54 static int usb4_native_switch_op(struct tb_switch *sw, u16 opcode, in usb4_native_switch_op() argument
63 ret = tb_sw_write(sw, metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_native_switch_op()
68 ret = tb_sw_write(sw, tx_data, TB_CFG_SWITCH, ROUTER_CS_9, in usb4_native_switch_op()
75 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, ROUTER_CS_26, 1); in usb4_native_switch_op()
79 ret = tb_switch_wait_for_bit(sw, ROUTER_CS_26, ROUTER_CS_26_OV, 0, 500); in usb4_native_switch_op()
83 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, ROUTER_CS_26, 1); in usb4_native_switch_op()
95 ret = tb_sw_read(sw, metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_native_switch_op()
100 ret = tb_sw_read(sw, rx_data, TB_CFG_SWITCH, ROUTER_CS_9, in usb4_native_switch_op()
109 static int __usb4_switch_op(struct tb_switch *sw, u16 opcode, u32 *metadata, in __usb4_switch_op() argument
113 const struct tb_cm_ops *cm_ops = sw in __usb4_switch_op()
142 usb4_switch_op(struct tb_switch * sw,u16 opcode,u32 * metadata,u8 * status) usb4_switch_op() argument
148 usb4_switch_op_data(struct tb_switch * sw,u16 opcode,u32 * metadata,u8 * status,const void * tx_data,size_t tx_dwords,void * rx_data,size_t rx_dwords) usb4_switch_op_data() argument
163 usb4_switch_check_wakes(struct tb_switch * sw) usb4_switch_check_wakes() argument
243 usb4_switch_setup(struct tb_switch * sw) usb4_switch_setup() argument
311 usb4_switch_configuration_valid(struct tb_switch * sw) usb4_switch_configuration_valid() argument
342 usb4_switch_read_uid(struct tb_switch * sw,u64 * uid) usb4_switch_read_uid() argument
351 struct tb_switch *sw = data; usb4_switch_drom_read_block() local
381 usb4_switch_drom_read(struct tb_switch * sw,unsigned int address,void * buf,size_t size) usb4_switch_drom_read() argument
397 usb4_switch_lane_bonding_possible(struct tb_switch * sw) usb4_switch_lane_bonding_possible() argument
421 usb4_switch_set_wake(struct tb_switch * sw,unsigned int flags,bool runtime) usb4_switch_set_wake() argument
502 usb4_switch_set_sleep(struct tb_switch * sw) usb4_switch_set_sleep() argument
531 usb4_switch_nvm_sector_size(struct tb_switch * sw) usb4_switch_nvm_sector_size() argument
551 struct tb_switch *sw = data; usb4_switch_nvm_read_block() local
583 usb4_switch_nvm_read(struct tb_switch * sw,unsigned int address,void * buf,size_t size) usb4_switch_nvm_read() argument
600 usb4_switch_nvm_set_offset(struct tb_switch * sw,unsigned int address) usb4_switch_nvm_set_offset() argument
621 struct tb_switch *sw = data; usb4_switch_nvm_write_next_block() local
647 usb4_switch_nvm_write(struct tb_switch * sw,unsigned int address,const void * buf,size_t size) usb4_switch_nvm_write() argument
675 usb4_switch_nvm_authenticate(struct tb_switch * sw) usb4_switch_nvm_authenticate() argument
709 usb4_switch_nvm_authenticate_status(struct tb_switch * sw,u32 * status) usb4_switch_nvm_authenticate_status() argument
753 usb4_switch_credits_init(struct tb_switch * sw) usb4_switch_credits_init() argument
895 usb4_switch_query_dp_resource(struct tb_switch * sw,struct tb_port * in) usb4_switch_query_dp_resource() argument
928 usb4_switch_alloc_dp_resource(struct tb_switch * sw,struct tb_port * in) usb4_switch_alloc_dp_resource() argument
953 usb4_switch_dealloc_dp_resource(struct tb_switch * sw,struct tb_port * in) usb4_switch_dealloc_dp_resource() argument
977 usb4_port_index(const struct tb_switch * sw,const struct tb_port * port) usb4_port_index() argument
1010 usb4_switch_map_pcie_down(struct tb_switch * sw,const struct tb_port * port) usb4_switch_map_pcie_down() argument
1043 usb4_switch_map_usb3_down(struct tb_switch * sw,const struct tb_port * port) usb4_switch_map_usb3_down() argument
1073 usb4_switch_add_ports(struct tb_switch * sw) usb4_switch_add_ports() argument
1106 usb4_switch_remove_ports(struct tb_switch * sw) usb4_switch_remove_ports() argument
[all...]
H A Ddebugfs.c221 static ssize_t regs_write(struct tb_switch *sw, struct tb_port *port, in regs_write() argument
226 struct tb *tb = sw->tb; in regs_write()
234 pm_runtime_get_sync(&sw->dev); in regs_write()
257 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, offset, 1); in regs_write()
266 pm_runtime_mark_last_busy(&sw->dev); in regs_write()
267 pm_runtime_put_autosuspend(&sw->dev); in regs_write()
279 return regs_write(port->sw, port, TB_CFG_PORT, user_buf, count, ppos); in port_regs_write()
288 return regs_write(port->sw, port, TB_CFG_HOPS, user_buf, count, ppos); in path_write()
295 struct tb_switch *sw = s->private; in switch_regs_write() local
297 return regs_write(sw, NUL in switch_regs_write()
386 struct tb_switch *sw = port->sw; port_sb_regs_write() local
1225 struct tb_switch *sw = port->sw; margining_run_write() local
1793 margining_switch_init(struct tb_switch * sw) margining_switch_init() argument
1810 margining_switch_remove(struct tb_switch * sw) margining_switch_remove() argument
1861 margining_switch_init(struct tb_switch * sw) margining_switch_init() argument
1862 margining_switch_remove(struct tb_switch * sw) margining_switch_remove() argument
1892 struct tb_switch *sw = port->sw; counters_write() local
1934 cap_show_by_dw(struct seq_file * s,struct tb_switch * sw,struct tb_port * port,unsigned int cap,unsigned int offset,u8 cap_id,u8 vsec_id,int dwords) cap_show_by_dw() argument
1957 cap_show(struct seq_file * s,struct tb_switch * sw,struct tb_port * port,unsigned int cap,u8 cap_id,u8 vsec_id,int length) cap_show() argument
2100 struct tb_switch *sw = port->sw; port_regs_show() local
2129 switch_cap_show(struct tb_switch * sw,struct seq_file * s,unsigned int cap) switch_cap_show() argument
2169 switch_caps_show(struct tb_switch * sw,struct seq_file * s) switch_caps_show() argument
2180 switch_basic_regs_show(struct tb_switch * sw,struct seq_file * s) switch_basic_regs_show() argument
2204 struct tb_switch *sw = s->private; switch_regs_show() local
2256 struct tb_switch *sw = port->sw; path_show() local
2319 struct tb_switch *sw = port->sw; counters_show() local
2379 struct tb_switch *sw = port->sw; port_sb_regs_show() local
2408 tb_switch_debugfs_init(struct tb_switch * sw) tb_switch_debugfs_init() argument
2452 tb_switch_debugfs_remove(struct tb_switch * sw) tb_switch_debugfs_remove() argument
[all...]
/linux/drivers/usb/roles/
H A Dclass.c70 * @sw: USB role switch
73 * Set USB role @role for @sw.
75 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
79 if (IS_ERR_OR_NULL(sw)) in usb_role_switch_set_role()
82 if (!sw->registered) in usb_role_switch_set_role()
85 mutex_lock(&sw->lock); in usb_role_switch_set_role()
87 ret = sw->set(sw, role); in usb_role_switch_set_role()
89 sw->role = role; in usb_role_switch_set_role()
90 kobject_uevent(&sw->dev.kobj, KOBJ_CHANGE); in usb_role_switch_set_role()
93 mutex_unlock(&sw->lock); in usb_role_switch_set_role()
[all …]
/linux/drivers/platform/surface/
H A Dsurface_aggregator_tabletsw.c29 int (*get_state)(struct ssam_tablet_sw *sw, struct ssam_tablet_sw_state *state);
30 const char *(*state_name)(struct ssam_tablet_sw *sw,
32 bool (*state_is_tablet_mode)(struct ssam_tablet_sw *sw,
55 int (*get_state)(struct ssam_tablet_sw *sw, struct ssam_tablet_sw_state *state);
56 const char *(*state_name)(struct ssam_tablet_sw *sw,
58 bool (*state_is_tablet_mode)(struct ssam_tablet_sw *sw,
72 struct ssam_tablet_sw *sw = dev_get_drvdata(dev); in state_show() local
73 const char *state = sw->ops.state_name(sw, &sw->state); in state_show()
90 struct ssam_tablet_sw *sw = container_of(work, struct ssam_tablet_sw, update_work); in ssam_tablet_sw_update_workfn() local
94 status = sw->ops.get_state(sw, &state); in ssam_tablet_sw_update_workfn()
[all …]
/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_router_hw.c54 static int prestera_nexthop_group_set(struct prestera_switch *sw,
57 prestera_nexthop_group_util_hw_state(struct prestera_switch *sw,
67 int prestera_router_hw_init(struct prestera_switch *sw) in prestera_router_hw_init() argument
71 err = rhashtable_init(&sw->router->nh_neigh_ht, in prestera_router_hw_init()
76 err = rhashtable_init(&sw->router->nexthop_group_ht, in prestera_router_hw_init()
81 err = rhashtable_init(&sw->router->fib_ht, in prestera_router_hw_init()
86 INIT_LIST_HEAD(&sw->router->vr_list); in prestera_router_hw_init()
87 INIT_LIST_HEAD(&sw->router->rif_entry_list); in prestera_router_hw_init()
92 rhashtable_destroy(&sw->router->nexthop_group_ht); in prestera_router_hw_init()
94 rhashtable_destroy(&sw->router->nh_neigh_ht); in prestera_router_hw_init()
[all …]
H A Dprestera_main.c93 struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw, in prestera_port_find_by_hwid() argument
98 read_lock(&sw->port_list_lock); in prestera_port_find_by_hwid()
99 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_port_find_by_hwid()
105 read_unlock(&sw->port_list_lock); in prestera_port_find_by_hwid()
110 struct prestera_port *prestera_find_port(struct prestera_switch *sw, u32 id) in prestera_find_port() argument
114 read_lock(&sw->port_list_lock); in prestera_find_port()
115 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_find_port()
121 read_unlock(&sw->port_list_lock); in prestera_find_port()
131 return port ? port->sw : NULL; in prestera_switch_get()
372 struct prestera_switch *sw = port->sw; in prestera_port_sfp_bind() local
[all …]
H A Dprestera_router.c106 static int prestera_util_nhc2nc_key(struct prestera_switch *sw, in prestera_util_nhc2nc_key() argument
133 prestera_util_nhc_eq_n_cache_key(struct prestera_switch *sw, in prestera_util_nhc_eq_n_cache_key() argument
140 err = prestera_util_nhc2nc_key(sw, nhc, &tk); in prestera_util_nhc_eq_n_cache_key()
151 prestera_util_neigh2nc_key(struct prestera_switch *sw, struct neighbour *n, in prestera_util_neigh2nc_key() argument
430 prestera_neigh_iface_init(struct prestera_switch *sw, in prestera_neigh_iface_init() argument
452 prestera_kern_neigh_cache_find(struct prestera_switch *sw, in prestera_kern_neigh_cache_find() argument
458 rhashtable_lookup_fast(&sw->router->kern_neigh_cache_ht, key, in prestera_kern_neigh_cache_find()
464 __prestera_kern_neigh_cache_destruct(struct prestera_switch *sw, in __prestera_kern_neigh_cache_destruct() argument
471 __prestera_kern_neigh_cache_destroy(struct prestera_switch *sw, in __prestera_kern_neigh_cache_destroy() argument
474 rhashtable_remove_fast(&sw->router->kern_neigh_cache_ht, in __prestera_kern_neigh_cache_destroy()
[all …]
H A Dprestera_hw.h140 (struct prestera_switch *sw, struct prestera_event *evt, void *arg);
152 int prestera_hw_switch_init(struct prestera_switch *sw);
153 void prestera_hw_switch_fini(struct prestera_switch *sw);
154 int prestera_hw_switch_ageing_set(struct prestera_switch *sw, u32 ageing_ms);
155 int prestera_hw_switch_mac_set(struct prestera_switch *sw, const char *mac);
192 int prestera_hw_vlan_create(struct prestera_switch *sw, u16 vid);
193 int prestera_hw_vlan_delete(struct prestera_switch *sw, u16 vid);
205 int prestera_hw_fdb_flush_vlan(struct prestera_switch *sw, u16 vid, u32 mode);
210 int prestera_hw_bridge_create(struct prestera_switch *sw, u16 *bridge_id);
211 int prestera_hw_bridge_delete(struct prestera_switch *sw, u16 bridge_id);
[all …]
H A Dprestera_hw.c813 static int __prestera_cmd_ret(struct prestera_switch *sw, in __prestera_cmd_ret() argument
819 struct prestera_device *dev = sw->dev; in __prestera_cmd_ret()
836 static int prestera_cmd_ret(struct prestera_switch *sw, in prestera_cmd_ret() argument
841 return __prestera_cmd_ret(sw, type, cmd, clen, ret, rlen, 0); in prestera_cmd_ret()
844 static int prestera_cmd_ret_wait(struct prestera_switch *sw, in prestera_cmd_ret_wait() argument
850 return __prestera_cmd_ret(sw, type, cmd, clen, ret, rlen, waitms); in prestera_cmd_ret_wait()
853 static int prestera_cmd(struct prestera_switch *sw, in prestera_cmd() argument
859 return prestera_cmd_ret(sw, type, cmd, clen, &resp.ret, sizeof(resp)); in prestera_cmd()
918 __find_event_handler(const struct prestera_switch *sw, in __find_event_handler() argument
923 list_for_each_entry_rcu(eh, &sw->event_handlers, list) { in __find_event_handler()
[all …]
H A Dprestera_span.c21 struct prestera_switch *sw; member
37 list_add_tail(&entry->list, &port->sw->span->entries); in prestera_span_entry_create()
78 struct prestera_switch *sw = port->sw; in prestera_span_get() local
82 entry = prestera_span_entry_find_by_port(sw->span, port); in prestera_span_get()
95 prestera_hw_span_release(sw, new_span_id); in prestera_span_get()
103 static int prestera_span_put(struct prestera_switch *sw, u8 span_id) in prestera_span_put() argument
108 entry = prestera_span_entry_find_by_id(sw->span, span_id); in prestera_span_put()
115 err = prestera_hw_span_release(sw, span_id); in prestera_span_put()
127 struct prestera_switch *sw = binding->port->sw; in prestera_span_rule_add() local
141 prestera_span_put(sw, span_id); in prestera_span_rule_add()
[all …]
H A Dprestera_devlink.c127 struct prestera_switch *sw; member
356 struct prestera_switch *sw = devlink_priv(dl); in prestera_dl_info_get() local
360 sw->dev->fw_rev.maj, in prestera_dl_info_get()
361 sw->dev->fw_rev.min, in prestera_dl_info_get()
362 sw->dev->fw_rev.sub); in prestera_dl_info_get()
396 void prestera_devlink_free(struct prestera_switch *sw) in prestera_devlink_free() argument
398 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_free()
403 void prestera_devlink_register(struct prestera_switch *sw) in prestera_devlink_register() argument
405 struct devlink *dl = priv_to_devlink(sw); in prestera_devlink_register()
410 void prestera_devlink_unregister(struct prestera_switch *sw) in prestera_devlink_unregister() argument
[all …]
/linux/arch/mips/alchemy/common/
H A Dsleeper.S25 sw $1, PT_R1(sp)
26 sw $2, PT_R2(sp)
27 sw $3, PT_R3(sp)
28 sw $4, PT_R4(sp)
29 sw $5, PT_R5(sp)
30 sw $6, PT_R6(sp)
31 sw $7, PT_R7(sp)
32 sw $16, PT_R16(sp)
33 sw $17, PT_R17(sp)
34 sw $18, PT_R18(sp)
[all …]
/linux/drivers/input/joystick/
H A Dsidewinder.c96 struct sw { struct
197 #define GB(pos,num) sw_get_bits(buf, pos, num, sw->bits)
283 static int sw_parse(unsigned char *buf, struct sw *sw) in sw_parse() argument
288 switch (sw->type) { in sw_parse()
295 dev = sw->dev[0]; in sw_parse()
317 for (i = 0; i < sw->number; i ++) { in sw_parse()
322 input_report_abs(sw->dev[i], ABS_X, GB(i*15+3,1) - GB(i*15+2,1)); in sw_parse()
323 input_report_abs(sw->dev[i], ABS_Y, GB(i*15+0,1) - GB(i*15+1,1)); in sw_parse()
326 input_report_key(sw->dev[i], sw_btn[SW_ID_GP][j], !GB(i*15+j+4,1)); in sw_parse()
328 input_sync(sw->dev[i]); in sw_parse()
[all …]
/linux/arch/openrisc/kernel/
H A Dentry.S46 l.sw -8(r1),r2 /* store frame pointer */ ;\
47 l.sw -4(r1),r9 /* store return address */ ;\
59 l.sw -12(r1),t1 /* save extra reg */ ;\
60 l.sw -8(r1),r2 /* store frame pointer */ ;\
61 l.sw -4(r1),r9 /* store return address */ ;\
147 l.sw PT_GPR2(r1),r2 ;\
148 l.sw PT_GPR3(r1),r3 ;\
150 l.sw PT_GPR5(r1),r5 ;\
151 l.sw PT_GPR6(r1),r6 ;\
152 l.sw PT_GPR7(r1),r7 ;\
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/engine/sw/
H A Dbase.c30 nvkm_sw_mthd(struct nvkm_sw *sw, int chid, int subc, u32 mthd, u32 data) in nvkm_sw_mthd() argument
36 spin_lock_irqsave(&sw->engine.lock, flags); in nvkm_sw_mthd()
37 list_for_each_entry(chan, &sw->chan, head) { in nvkm_sw_mthd()
41 list_add(&chan->head, &sw->chan); in nvkm_sw_mthd()
45 spin_unlock_irqrestore(&sw->engine.lock, flags); in nvkm_sw_mthd()
61 struct nvkm_sw *sw = nvkm_sw(oclass->engine); in nvkm_sw_oclass_get() local
64 while (sw->func->sclass[c].ctor) { in nvkm_sw_oclass_get()
66 oclass->engn = &sw->func->sclass[index]; in nvkm_sw_oclass_get()
67 oclass->base = sw->func->sclass[index].base; in nvkm_sw_oclass_get()
80 struct nvkm_sw *sw = nvkm_sw(oclass->engine); in nvkm_sw_cclass_get() local
[all …]
/linux/drivers/soc/bcm/brcmstb/pm/
H A Ds3-mips.S26 sw ra, 0(t0)
27 sw s0, 4(t0)
28 sw s1, 8(t0)
29 sw s2, 12(t0)
30 sw s3, 16(t0)
31 sw s4, 20(t0)
32 sw s5, 24(t0)
33 sw s6, 28(t0)
34 sw s7, 32(t0)
35 sw gp, 36(t0)
[all …]
H A Ds2-mips.S23 sw ra, 0(sp)
24 sw s0, 4(sp)
25 sw s1, 8(sp)
26 sw s2, 12(sp)
27 sw s3, 16(sp)
28 sw s4, 20(sp)
29 sw s5, 24(sp)
30 sw s6, 28(sp)
31 sw s7, 32(sp)
79 sw zero, AON_CTRL_PM_CTRL(s0)
[all …]
/linux/tools/testing/selftests/drivers/net/bonding/
H A Dbond-lladdr-target.sh9 # | | | sw
25 sw="sw-$(mktemp -u XXXXXX)"
30 ip netns del $sw
46 ip netns add $sw
49 ip -n $host link add veth0 type veth peer name veth0 netns $sw
50 ip -n $host link add veth1 type veth peer name veth1 netns $sw
52 ip -n $sw link add br0 type bridge
53 ip -n $sw link set br0 up
54 sw_lladdr=$(ip -n $sw addr show br0 | awk '/fe80/{print $2}' | cut -d'/' -f1)
56 slowwait 2 wait_lladdr_dad ip -n $sw addr show br0
[all …]
/linux/drivers/block/
H A Dswim3.c274 struct swim3 __iomem *sw = fs->swim3; in swim3_select() local
276 out_8(&sw->select, RELAX); in swim3_select()
278 out_8(&sw->control_bis, SELECT); in swim3_select()
280 out_8(&sw->control_bic, SELECT); in swim3_select()
281 out_8(&sw->select, sel & CA_MASK); in swim3_select()
286 struct swim3 __iomem *sw = fs->swim3; in swim3_action() local
290 out_8(&sw->select, sw->select | LSTRB); in swim3_action()
292 out_8(&sw->select, sw->select & ~LSTRB); in swim3_action()
298 struct swim3 __iomem *sw = fs->swim3; in swim3_readbit() local
303 stat = in_8(&sw->status); in swim3_readbit()
[all …]
/linux/include/linux/usb/
H A Drole.h16 typedef int (*usb_role_switch_set_t)(struct usb_role_switch *sw,
18 typedef enum usb_role (*usb_role_switch_get_t)(struct usb_role_switch *sw);
52 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role);
53 enum usb_role usb_role_switch_get_role(struct usb_role_switch *sw);
56 void usb_role_switch_put(struct usb_role_switch *sw);
64 void usb_role_switch_unregister(struct usb_role_switch *sw);
66 void usb_role_switch_set_drvdata(struct usb_role_switch *sw, void *data);
67 void *usb_role_switch_get_drvdata(struct usb_role_switch *sw);
70 static inline int usb_role_switch_set_role(struct usb_role_switch *sw, in usb_role_switch_set_role() argument
76 static inline enum usb_role usb_role_switch_get_role(struct usb_role_switch *sw) in usb_role_switch_get_role() argument
[all …]

12345678910>>...51